[FFmpeg-devel] [PATCH] vc1dec: propagate error codes
wm4
nfxjfg at googlemail.com
Thu Aug 6 12:08:41 CEST 2015
On Thu, 6 Aug 2015 11:55:31 +0200
Michael Niedermayer <michael at niedermayer.cc> wrote:
> On Thu, Aug 06, 2015 at 11:27:00AM +0200, wm4 wrote:
> > Also fix some instances of returning -1 as error code.
> > ---
> > Note that not all of the mpegvideo functions return meaningful error
> > codes, but that should be ok for now.
> > ---
> > libavcodec/vc1dec.c | 36 ++++++++++++++++++------------------
> > 1 file changed, 18 insertions(+), 18 deletions(-)
>
> it seems after this patch there would be "goto err" cases which
> dont set ret, potentially leaving it >= 0
>
> for example:
> if ((ret = ff_vc1_decode_init_alloc_tables(v)) < 0) {
> ff_mpv_common_end(s);
> goto err;
> }
>
> s->low_delay = !avctx->has_b_frames || v->res_sprite;
>
> if (v->profile == PROFILE_ADVANCED) {
> if(avctx->coded_width<=1 || avctx->coded_height<=1)
> goto err;
> ^^^^^^^^^^
>
> [...]
True, I intended to handle this by setting ret to a defined value, but
of course it'll overwritten by other successful calls.
More information about the ffmpeg-devel
mailing list