[FFmpeg-cvslog] r22208 - trunk/libavformat/bink.c

Reimar Döffinger Reimar.Doeffinger
Thu Mar 4 18:28:05 CET 2010


On Thu, Mar 04, 2010 at 02:27:53PM +0100, pross wrote:
> Author: pross
> Date: Thu Mar  4 14:27:53 2010
> New Revision: 22208
> 
> Log:
> handle errors reported by av_get_packet() in Bink demuxer
> 
> Modified:
>    trunk/libavformat/bink.c
> 
> Modified: trunk/libavformat/bink.c
> ==============================================================================
> --- trunk/libavformat/bink.c	Thu Mar  4 14:26:01 2010	(r22207)
> +++ trunk/libavformat/bink.c	Thu Mar  4 14:27:53 2010	(r22208)
> @@ -212,8 +212,7 @@ static int read_packet(AVFormatContext *
>          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;

Hm, I think this should be
return ret < 0 ? ret : AVERROR(EIO);
or something like that.
Otherwise you say "everything's great, here's the next packet" although
you have completely failed reading anything sensible...



More information about the ffmpeg-cvslog mailing list