[FFmpeg-devel] [PATCH v2 1/2] avcodec/decode: use a single list bsf for codec decode bsfs
James Almer
jamrial at gmail.com
Mon Apr 27 01:51:44 EEST 2020
On 4/26/2020 5:34 AM, Marton Balint wrote:
> void avcodec_flush_buffers(AVCodecContext *avctx)
> {
> AVCodecInternal *avci = avctx->internal;
> @@ -2117,7 +2001,7 @@ void avcodec_flush_buffers(AVCodecContext *avctx)
> avctx->pts_correction_last_pts =
> avctx->pts_correction_last_dts = INT64_MIN;
>
> - bsfs_flush(avctx);
> + av_bsf_flush(avci->filter.bsf);
This function can be called with encoders as well, and after this change
you'll be calling av_bsf_flush() with NULL as argument.
Easiest solution is to add an av_codec_is_decoder(avctx->codec) check
before calling it, i guess.
>
> if (!avctx->refcounted_frames)
> av_frame_unref(avci->to_free);
More information about the ffmpeg-devel
mailing list