[FFmpeg-devel] [PATCH 80/80] avcodec/mpegvideo_enc: Remove redundant unref+ref

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Thu Feb 3 03:06:31 EET 2022


Setting current_picture will already be done in frame_start().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavcodec/mpegvideo_enc.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index ddfd123c46..9c68983205 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1598,11 +1598,6 @@ no_output_pic:
                     s->new_picture->data[i] += INPLACE_OFFSET;
             }
         }
-        ff_mpeg_unref_picture(s->avctx, &s->current_picture);
-        if ((ret = ff_mpeg_ref_picture(s->avctx, &s->current_picture,
-                                       s->current_picture_ptr)) < 0)
-            return ret;
-
         s->picture_number = s->new_picture->display_picture_number;
     }
     return 0;
-- 
2.32.0



More information about the ffmpeg-devel mailing list