[FFmpeg-cvslog] avcodec/mpegvideo_dec: Remove obsolete current_picture_ptr reuse code

Andreas Rheinhardt git at videolan.org
Mon Apr 8 16:18:34 EEST 2024


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sat Oct 14 22:23:46 2023 +0200| [da4cca5fc0d60d042fed2692459392b3606fe2f3] | committer: Andreas Rheinhardt

avcodec/mpegvideo_dec: Remove obsolete current_picture_ptr reuse code

Obsolete since at least 74d623914f02aa79447df43a742efd0929dded04.

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

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

 libavcodec/mpegvideo_dec.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/libavcodec/mpegvideo_dec.c b/libavcodec/mpegvideo_dec.c
index 1059aa9825..9f674488c0 100644
--- a/libavcodec/mpegvideo_dec.c
+++ b/libavcodec/mpegvideo_dec.c
@@ -325,18 +325,12 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx)
     ff_mpeg_unref_picture(&s->last_picture);
     ff_mpeg_unref_picture(&s->next_picture);
 
-    if (s->current_picture_ptr && !s->current_picture_ptr->f->buf[0]) {
-        // we already have an unused image
-        // (maybe it was set before reading the header)
-        pic = s->current_picture_ptr;
-    } else {
         idx = ff_find_unused_picture(s->avctx, s->picture, 0);
         if (idx < 0) {
             av_log(s->avctx, AV_LOG_ERROR, "no frame buffer available\n");
             return idx;
         }
         pic = &s->picture[idx];
-    }
 
     pic->reference = 0;
     if (!s->droppable) {



More information about the ffmpeg-cvslog mailing list