mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
Merge commit 'b869eea7ea8f5d8331fcd6355f848bb6a6e06b14'
* commit 'b869eea7ea8f5d8331fcd6355f848bb6a6e06b14': h263dec: Fix order of initialization Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
012062cfd5
@ -456,21 +456,9 @@ retry:
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if (!s->context_initialized) {
|
||||
if (!s->context_initialized)
|
||||
// we need the idct permutaton for reading a custom matrix
|
||||
ff_mpv_idct_init(s);
|
||||
if ((ret = ff_MPV_common_init(s)) < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* We need to set current_picture_ptr before reading the header,
|
||||
* otherwise we cannot store anyting in there */
|
||||
if (s->current_picture_ptr == NULL || s->current_picture_ptr->f->data[0]) {
|
||||
int i = ff_find_unused_picture(s, 0);
|
||||
if (i < 0)
|
||||
return i;
|
||||
s->current_picture_ptr = &s->picture[i];
|
||||
}
|
||||
|
||||
/* let's go :-) */
|
||||
if (CONFIG_WMV2_DECODER && s->msmpeg4_version == 5) {
|
||||
@ -510,6 +498,17 @@ retry:
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (!s->context_initialized)
|
||||
if ((ret = ff_MPV_common_init(s)) < 0)
|
||||
return ret;
|
||||
|
||||
if (s->current_picture_ptr == NULL || s->current_picture_ptr->f->data[0]) {
|
||||
int i = ff_find_unused_picture(s, 0);
|
||||
if (i < 0)
|
||||
return i;
|
||||
s->current_picture_ptr = &s->picture[i];
|
||||
}
|
||||
|
||||
avctx->has_b_frames = !s->low_delay;
|
||||
|
||||
if (CONFIG_MPEG4_DECODER && avctx->codec_id == AV_CODEC_ID_MPEG4) {
|
||||
|
Loading…
Reference in New Issue
Block a user