aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h261dec.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-06-13 15:48:26 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-06-20 18:58:39 +0200
commiteb0beffcb33c034d2e611957ea69b8be5d456004 (patch)
tree80eaedf9aa8400ca18733079015cfdad7776d4fd /libavcodec/h261dec.c
parent9933dfe103166c43569a3b5bd4649b2e7fcefa0a (diff)
downloadffmpeg-eb0beffcb33c034d2e611957ea69b8be5d456004.tar.gz
avcodec/h261dec: Don't set framerate multiple times
Just do it once during init. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/h261dec.c')
-rw-r--r--libavcodec/h261dec.c4
1 files 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 */