Just check for the existence of the bsf. This is equivalent to the old criterion of the AVCodecContext being a decoder.
Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> --- libavcodec/avcodec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c index 5d85ed234b..ff3d73e237 100644 --- a/libavcodec/avcodec.c +++ b/libavcodec/avcodec.c @@ -418,7 +418,7 @@ void avcodec_flush_buffers(AVCodecContext *avctx) avctx->pts_correction_last_pts = avctx->pts_correction_last_dts = INT64_MIN; - if (av_codec_is_decoder(avctx->codec)) + if (avci->bsf) av_bsf_flush(avci->bsf); } -- 2.30.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".