There is no need to parse the header twice; doing so does nothing.
Unified · Split
| @@ -614,7 +614,6 @@ static int h261_decode_frame(AVCodecContext *avctx, AVFrame *pict, · 613 unmodified lines | |||
| 614 | 614 | ||
| 615 | h->gob_start_code_skipped = 0; | 615 | h->gob_start_code_skipped = 0; |
| 616 | 616 | ||
| 617 | retry: | ||
| 618 | init_get_bits(&s->gb, buf, buf_size * 8); | 617 | init_get_bits(&s->gb, buf, buf_size * 8); |
| 619 | 618 | ||
| 620 | ret = h261_decode_picture_header(h); | 619 | ret = h261_decode_picture_header(h); |
| @@ -636,8 +635,6 @@ retry: · 15 unmodified lines | |||
| 636 | ret = ff_set_dimensions(avctx, s->width, s->height); | 635 | ret = ff_set_dimensions(avctx, s->width, s->height); |
| 637 | if (ret < 0) | 636 | if (ret < 0) |
| 638 | return ret; | 637 | return ret; |
| 639 | |||
| 640 | goto retry; | ||
| 641 | } | 638 | } |
| 642 | 639 | ||
| 643 | if ((avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type == AV_PICTURE_TYPE_B) || | 640 | if ((avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type == AV_PICTURE_TYPE_B) || |