[FFmpeg-cvslog] bmv: get a new frame on every decode_frame(), so we can use direct rendering

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Oct 20 10:36:58 CEST 2012


On Fri, Oct 19, 2012 at 02:20:20PM +0200, Kostya Shishkov wrote:
> +    if (c->pic.data[0])
> +        avctx->release_buffer(avctx, &c->pic);
> +
> +    c->pic.reference = 3;
> +    if ((ret = avctx->get_buffer(avctx, &c->pic)) < 0) {
> +        av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
> +        return ret;
> +    }

This doesn't make sense to me, we set pic.reference but we never have
more than one frame allocated.
Maybe this should be switched to the newer flag-based API to allow marking frames
as P-frames while at the same time saying that it is ok to modify/destroy the
AVFrame data?


More information about the ffmpeg-cvslog mailing list