Commit 595c6335 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '552bc42d'

* commit '552bc42d':
  h261dec: Fix order of initialization
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 012062cf 552bc42d
......@@ -590,12 +590,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);
......@@ -611,6 +608,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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment