ffmpeg | branch: master | Andreas Rheinhardt <[email protected]> | Thu Dec 23 22:56:11 2021 +0100| [ee41c60373fcb8b1d49929367e564020361838da] | committer: Andreas Rheinhardt
avcodec/mpegvideo: Remove always-false check An AVCodecContext's private data is always allocated in avcodec_open2() and calling avcodec_flush_buffers() on an unopened AVCodecContext (or an already closed one) is not allowed (and will crash before the decoder's flush function is even called). Signed-off-by: Andreas Rheinhardt <[email protected]> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ee41c60373fcb8b1d49929367e564020361838da --- libavcodec/mpegvideo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 129e0ef647..d34dadf939 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -2318,7 +2318,7 @@ void ff_mpeg_flush(AVCodecContext *avctx){ int i; MpegEncContext *s = avctx->priv_data; - if (!s || !s->picture) + if (!s->picture) return; for (i = 0; i < MAX_PICTURE_COUNT; i++) _______________________________________________ ffmpeg-cvslog mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
