[FFmpeg-devel] [PATCH] oggdec: in ogg_get_length(), check the return value of ogg_save()

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue May 24 20:19:51 CEST 2011


On Tue, May 24, 2011 at 04:17:59PM +0200, Stefano Sabatini wrote:
> @@ -473,7 +473,8 @@ static int ogg_get_length(AVFormatContext *s)
>          return 0;
>      end = size > MAX_PAGE_SIZE? size - MAX_PAGE_SIZE: 0;
>  
> -    ogg_save (s);
> +    if ((ret = ogg_save(s)) < 0)
> +        return ret;


I would prefer if here and in general (also the other patches) you could
leave this split, i.e.
> ret = ogg_save(s);
> if (ret < 0)
>     return ret;

I still think it is a lot more readable and more consistent with most
of FFmpeg code.


More information about the ffmpeg-devel mailing list