[FFmpeg-devel] suspicious unconditional `goto fail` in decode.c:1892

Pavel Koshevoy pkoshevoy at gmail.com
Wed May 27 21:55:56 EEST 2020


Hi,

I've run into a regression that I've tracked down to this snippet of
code in libavcodec/decode.c
```
    if (hwaccel) {
        if (hwaccel->alloc_frame) {
            ret = hwaccel->alloc_frame(avctx, frame);
            goto fail;
        }
    } else
        avctx->sw_pix_fmt = avctx->pix_fmt;
```

The `goto fail` is unconditional, and was introduced in commit a1133db30ef
I'd like to confirm whether it is intentional.

Thank you,
    Pavel.


More information about the ffmpeg-devel mailing list