aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegvideo.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-12-23 22:56:11 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-01-04 16:28:55 +0100
commitee41c60373fcb8b1d49929367e564020361838da (patch)
tree6eecfeeae1e4ed242bc2e7b2758c85672444775d /libavcodec/mpegvideo.c
parent5de7bce12e9469911a743cb3dcfb86776ccbf57c (diff)
downloadffmpeg-ee41c60373fcb8b1d49929367e564020361838da.tar.gz
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 <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c2
1 files changed, 1 insertions, 1 deletions
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++)