They are generally set in ff_mpv_init_context_frame() (mostly called by ff_mpv_common_init()); setting them somewhere else should be avoided.
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -527,17 +527,11 @@ static int h261_decode_picture_header(H261DecContext *h) · 526 unmodified lines | |||
| 527 | if (format == 0) { // QCIF | 527 | if (format == 0) { // QCIF |
| 528 | s->width = 176; | 528 | s->width = 176; |
| 529 | s->height = 144; | 529 | s->height = 144; |
| 530 | s->mb_width = 11; | ||
| 531 | s->mb_height = 9; | ||
| 532 | } else { // CIF | 530 | } else { // CIF |
| 533 | s->width = 352; | 531 | s->width = 352; |
| 534 | s->height = 288; | 532 | s->height = 288; |
| 535 | s->mb_width = 22; | ||
| 536 | s->mb_height = 18; | ||
| 537 | } | 533 | } |
| 538 | 534 | ||
| 539 | s->mb_num = s->mb_width * s->mb_height; | ||
| 540 | |||
| 541 | skip_bits1(&s->gb); /* still image mode off */ | 535 | skip_bits1(&s->gb); /* still image mode off */ |
| 542 | skip_bits1(&s->gb); /* Reserved */ | 536 | skip_bits1(&s->gb); /* Reserved */ |
| 543 | 537 | ||