mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
h261dec: Fix order of initialization
ff_MPV_common_init requires the frame dimensions which get parsed in h261_decode_picture_header.
This commit is contained in:
parent
b869eea7ea
commit
552bc42df4
@ -581,12 +581,9 @@ static int h261_decode_frame(AVCodecContext *avctx, void *data,
|
||||
retry:
|
||||
init_get_bits(&s->gb, buf, buf_size * 8);
|
||||
|
||||
if (!s->context_initialized) {
|
||||
if (!s->context_initialized)
|
||||
// we need the IDCT permutaton for reading a custom matrix
|
||||
ff_mpv_idct_init(s);
|
||||
if (ff_MPV_common_init(s) < 0)
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = h261_decode_picture_header(h);
|
||||
|
||||
@ -602,6 +599,11 @@ retry:
|
||||
ff_MPV_common_end(s);
|
||||
s->parse_context = pc;
|
||||
}
|
||||
|
||||
if (!s->context_initialized)
|
||||
if ((ret = ff_MPV_common_init(s)) < 0)
|
||||
return ret;
|
||||
|
||||
if (!s->context_initialized) {
|
||||
ret = ff_set_dimensions(avctx, s->width, s->height);
|
||||
if (ret < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user