[FFmpeg-cvslog] avcodec/mpegvideo_enc: Remove redundant unref+ref

Andreas Rheinhardt git at videolan.org
Fri Apr 1 19:18:17 EEST 2022


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Thu Feb  3 01:39:56 2022 +0100| [451300d0e81392cd45bdce8dc5b56fb6913720ca] | committer: Andreas Rheinhardt

avcodec/mpegvideo_enc: Remove redundant unref+ref

Setting current_picture will already be done in frame_start().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=451300d0e81392cd45bdce8dc5b56fb6913720ca
---

 libavcodec/mpegvideo_enc.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 58594e1696..3dd0fc7c30 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1529,11 +1529,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;



More information about the ffmpeg-cvslog mailing list