On Tue, 31 Mar 2015 20:01:45 +0200
Michael Niedermayer <michae...@gmx.at> wrote:

> On Tue, Mar 31, 2015 at 12:37:23PM +0000, Donny Yang wrote:
> > Signed-off-by: Donny Yang <w...@kota.moe>
> [...]
> 
> > +    ret = encode_headers(avctx, pict);
> > +    if (ret)
> > +        return ret;
> > +
> > +    ret = encode_frame(avctx, pict);
> > +    if (ret)
> > +        return ret;
> 
> error checks are "< 0" in ffmpeg unless something else is dicatated
> by external API
> 
> also this fails build:
> 
> ffmpeg/libavcodec/pngenc.c: In function ‘encode’:
> ffmpeg/libavcodec/pngenc.c:463:46: error: ‘row_size’ undeclared (first use in 
> this function)
> ffmpeg/libavcodec/pngenc.c:463:46: note: each undeclared identifier is 
> reported only once for each function it appears in
> 
> [...]

Also the usual idiom is:

   if ((ret = somefunction()) < 0)
       return ret;

(Apparently.)
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to