Just do it once during init.
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -87,6 +87,8 @@ static av_cold int h261_decode_init(AVCodecContext *avctx) · 86 unmodified lines | ||
| 87 | 87 | MpegEncContext *const s = &h->s; |
| 88 | 88 | int ret; |
| 89 | 89 | |
| 90 | + avctx->framerate = (AVRational) { 30000, 1001 }; | |
| 91 | + | |
| 90 | 92 | s->private_ctx = &h->common; |
| 91 | 93 | // set defaults |
| 92 | 94 | ret = ff_mpv_decode_init(s, avctx); |
| @@ -473,8 +475,6 @@ static int h261_decode_picture_header(H261DecContext *h) · 380 unmodified lines | ||
| 473 | 475 | /* temporal reference */ |
| 474 | 476 | skip_bits(&s->gb, 5); /* picture timestamp */ |
| 475 | 477 | |
| 476 | − s->avctx->framerate = (AVRational) { 30000, 1001 }; | |
| 477 | − | |
| 478 | 478 | /* PTYPE starts here */ |
| 479 | 479 | skip_bits1(&s->gb); /* split screen off */ |
| 480 | 480 | skip_bits1(&s->gb); /* camera off */ |