[FFmpeg-cvslog] avcodec/h261dec: Remove pointless goto

Andreas Rheinhardt git at videolan.org
Mon Oct 9 19:01:50 EEST 2023


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Fri Oct  6 23:58:21 2023 +0200| [fc880c70326a9d5ad3f501db5fdf686cf11b60b1] | committer: Andreas Rheinhardt

avcodec/h261dec: Remove pointless goto

There is no need to parse the header twice; doing so does nothing.

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

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

 libavcodec/h261dec.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c
index 447e168c4f..35137b9296 100644
--- a/libavcodec/h261dec.c
+++ b/libavcodec/h261dec.c
@@ -614,7 +614,6 @@ static int h261_decode_frame(AVCodecContext *avctx, AVFrame *pict,
 
     h->gob_start_code_skipped = 0;
 
-retry:
     init_get_bits(&s->gb, buf, buf_size * 8);
 
     ret = h261_decode_picture_header(h);
@@ -636,8 +635,6 @@ retry:
         ret = ff_set_dimensions(avctx, s->width, s->height);
         if (ret < 0)
             return ret;
-
-        goto retry;
     }
 
     if ((avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type == AV_PICTURE_TYPE_B) ||



More information about the ffmpeg-cvslog mailing list