[FFmpeg-cvslog] avcodec/h261dec: Don't set framerate multiple times

Andreas Rheinhardt git at videolan.org
Thu Jun 20 20:01:18 EEST 2024


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Thu Jun 13 15:48:26 2024 +0200| [eb0beffcb33c034d2e611957ea69b8be5d456004] | committer: Andreas Rheinhardt

avcodec/h261dec: Don't set framerate multiple times

Just do it once during init.

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

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

 libavcodec/h261dec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c
index 852de8d535..cabca33c8d 100644
--- a/libavcodec/h261dec.c
+++ b/libavcodec/h261dec.c
@@ -87,6 +87,8 @@ static av_cold int h261_decode_init(AVCodecContext *avctx)
     MpegEncContext *const s = &h->s;
     int ret;
 
+    avctx->framerate = (AVRational) { 30000, 1001 };
+
     s->private_ctx = &h->common;
     // set defaults
     ret = ff_mpv_decode_init(s, avctx);
@@ -473,8 +475,6 @@ static int h261_decode_picture_header(H261DecContext *h)
     /* temporal reference */
     skip_bits(&s->gb, 5); /* picture timestamp */
 
-    s->avctx->framerate = (AVRational) { 30000, 1001 };
-
     /* PTYPE starts here */
     skip_bits1(&s->gb); /* split screen off */
     skip_bits1(&s->gb); /* camera  off */



More information about the ffmpeg-cvslog mailing list