From 6c88dc3dbf5a2c796023227b59a963d23801801e Mon Sep 17 00:00:00 2001 From: Peter Ross Date: Thu, 4 Mar 2010 13:27:53 +0000 Subject: handle errors reported by av_get_packet() in Bink demuxer Originally committed as revision 22208 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/bink.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libavformat/bink.c') diff --git a/libavformat/bink.c b/libavformat/bink.c index efccabde63..09da7e2c69 100644 --- a/libavformat/bink.c +++ b/libavformat/bink.c @@ -212,8 +212,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt) bink->current_track++; if (audio_size >= 4) { /* get one audio packet per track */ - if ((ret = av_get_packet(pb, pkt, audio_size)) - != audio_size) + if ((ret = av_get_packet(pb, pkt, audio_size)) <= 0) return ret; pkt->stream_index = bink->current_track; pkt->pts = bink->audio_pts[bink->current_track - 1]; -- cgit v1.2.3