diff mbox series

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

Message ID AM7PR03MB6660E11B49AE2A2E82E427108F289@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 451300d0e81392cd45bdce8dc5b56fb6913720ca
Headers show
Series [FFmpeg-devel,v2,01/69] avcodec/avcodec: Avoid MpegEncContext in AVHWAccel.decode_mb | expand

Checks

Context Check Description
andriy/make_aarch64_jetson success Make finished
andriy/make_fate_aarch64_jetson success Make fate finished
andriy/make_armv7_RPi4 success Make finished
andriy/make_fate_armv7_RPi4 success Make fate finished
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 Feb. 3, 2022, 1:06 a.m. UTC
Setting current_picture will already be done in frame_start().

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

Patch

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;