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 | MpegEncContext *const s = &h->s; | 87 | MpegEncContext *const s = &h->s; |
| 88 | int ret; | 88 | int ret; |
| 89 | 89 | ||
| 90 | avctx->framerate = (AVRational) { 30000, 1001 }; | ||
| 91 | |||
| 90 | s->private_ctx = &h->common; | 92 | s->private_ctx = &h->common; |
| 91 | // set defaults | 93 | // set defaults |
| 92 | ret = ff_mpv_decode_init(s, avctx); | 94 | ret = ff_mpv_decode_init(s, avctx); |
| @@ -473,8 +475,6 @@ static int h261_decode_picture_header(H261DecContext *h) · 380 unmodified lines | |||
| 473 | /* temporal reference */ | 475 | /* temporal reference */ |
| 474 | skip_bits(&s->gb, 5); /* picture timestamp */ | 476 | skip_bits(&s->gb, 5); /* picture timestamp */ |
| 475 | 477 | ||
| 476 | s->avctx->framerate = (AVRational) { 30000, 1001 }; | ||
| 477 | |||
| 478 | /* PTYPE starts here */ | 478 | /* PTYPE starts here */ |
| 479 | skip_bits1(&s->gb); /* split screen off */ | 479 | skip_bits1(&s->gb); /* split screen off */ |
| 480 | skip_bits1(&s->gb); /* camera off */ | 480 | skip_bits1(&s->gb); /* camera off */ |