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>
This commit is contained in:
@@ -2318,7 +2318,7 @@ void ff_mpeg_flush(AVCodecContext *avctx){
|
|||||||
int i;
|
int i;
|
||||||
MpegEncContext *s = avctx->priv_data;
|
MpegEncContext *s = avctx->priv_data;
|
||||||
|
|
||||||
if (!s || !s->picture)
|
if (!s->picture)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (i = 0; i < MAX_PICTURE_COUNT; i++)
|
for (i = 0; i < MAX_PICTURE_COUNT; i++)
|
||||||
|
Reference in New Issue
Block a user