diff mbox series

[FFmpeg-devel,3/7] avcodec/mpegvideo_end, vc1dec: Remove always-false check

Message ID AM7PR03MB6660B728CB5259C33219E7C68F749@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit b72723d415ff059aaf1038fa98900eb3e93896d3
Headers show
Series [FFmpeg-devel,1/7] avcodec/mpegvideo: Move closed_gop to Mpeg1Context | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Dec. 13, 2021, 1:38 a.m. UTC
Mpeg1EncContext.droppable is only nonzero for the FLV decoder.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/mpegvideo_enc.c | 3 +--
 libavcodec/vc1dec.c        | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index f804b8215d..d33cf9477d 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1658,8 +1658,7 @@  static int frame_start(MpegEncContext *s)
 
     if (s->pict_type != AV_PICTURE_TYPE_B) {
         s->last_picture_ptr = s->next_picture_ptr;
-        if (!s->droppable)
-            s->next_picture_ptr = s->current_picture_ptr;
+        s->next_picture_ptr = s->current_picture_ptr;
     }
 
     if (s->last_picture_ptr) {
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index e636fa6160..267d72d15b 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -862,7 +862,7 @@  static int vc1_decode_frame(AVCodecContext *avctx, void *data,
     s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I;
 
     /* skip B-frames if we don't have reference frames */
-    if (!s->last_picture_ptr && (s->pict_type == AV_PICTURE_TYPE_B || s->droppable)) {
+    if (!s->last_picture_ptr && s->pict_type == AV_PICTURE_TYPE_B) {
         av_log(v->s.avctx, AV_LOG_DEBUG, "Skipping B frame without reference frames\n");
         goto end;
     }