[FFmpeg-devel] [PATCH 2/4] png: Clearly separate encoding header and frames
wm4
nfxjfg at googlemail.com
Tue Mar 31 20:35:46 CEST 2015
On Tue, 31 Mar 2015 20:01:45 +0200
Michael Niedermayer <michaelni at gmx.at> wrote:
> On Tue, Mar 31, 2015 at 12:37:23PM +0000, Donny Yang wrote:
> > Signed-off-by: Donny Yang <work at 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.)
More information about the ffmpeg-devel
mailing list