mirror of https://git.ffmpeg.org/ffmpeg.git
Merge commit '552bc42df48784ae3ce0d499ece5b33f3cc7576a'
* commit '552bc42df48784ae3ce0d499ece5b33f3cc7576a': h261dec: Fix order of initialization Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
595c63357c
|
@ -590,12 +590,9 @@ static int h261_decode_frame(AVCodecContext *avctx, void *data,
|
||||||
retry:
|
retry:
|
||||||
init_get_bits(&s->gb, buf, buf_size * 8);
|
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
|
// we need the IDCT permutaton for reading a custom matrix
|
||||||
ff_mpv_idct_init(s);
|
ff_mpv_idct_init(s);
|
||||||
if (ff_MPV_common_init(s) < 0)
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = h261_decode_picture_header(h);
|
ret = h261_decode_picture_header(h);
|
||||||
|
|
||||||
|
@ -611,6 +608,11 @@ retry:
|
||||||
ff_MPV_common_end(s);
|
ff_MPV_common_end(s);
|
||||||
s->parse_context = pc;
|
s->parse_context = pc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!s->context_initialized)
|
||||||
|
if ((ret = ff_MPV_common_init(s)) < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
if (!s->context_initialized) {
|
if (!s->context_initialized) {
|
||||||
ret = ff_set_dimensions(avctx, s->width, s->height);
|
ret = ff_set_dimensions(avctx, s->width, s->height);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
|
Loading…
Reference in New Issue