[FFmpeg-devel] [PATCH] lavc: reset codec on receiving packet after EOF in compat_decode

Derek Buitenhuis derek.buitenhuis at gmail.com
Thu Nov 9 16:00:36 EET 2017


On 11/9/2017 12:21 PM, James Cowgill wrote:
> +    if (avci->draining_done && pkt && pkt->size != 0) {
> +        av_log(avctx, AV_LOG_WARNING, "Got unexpected packet after EOF\n");
> +        avcodec_flush_buffers(avctx);
> +    }

Is it more sensible to actually return an error here? Otherwise it's just enabling
future incorrect code; API users tend to ignore stderr warnings. I guess an argument
could be made both ways.

- Derek


More information about the ffmpeg-devel mailing list