Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-01-30 01:37:37 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-02-01 00:43:04 +0400
commit05ebe51e00e900bcef7d3e9bcd6b91d4aab34de7 (patch)
tree298f50517b2fec6d7570a27e05487b95c8e4a9e5 /libavcodec/mpegvideo.c
parente4a714f65a0c9e03d6e5dd57a3d4a0451e193f55 (diff)
mpeg/h264: update thread context even if it is not initialized.
Fixes decoding of Ticket952 Tested-by: Nicolas George <nicolas.george@normalesup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 04c149a99b..f197bd78a2 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -531,7 +531,7 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst,
{
MpegEncContext *s = dst->priv_data, *s1 = src->priv_data;
- if (dst == src || !s1->context_initialized)
+ if (dst == src)
return 0;
// FIXME can parameters change on I-frames?
@@ -540,12 +540,14 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst,
memcpy(s, s1, sizeof(MpegEncContext));
s->avctx = dst;
- s->picture_range_start += MAX_PICTURE_COUNT;
- s->picture_range_end += MAX_PICTURE_COUNT;
s->bitstream_buffer = NULL;
s->bitstream_buffer_size = s->allocated_bitstream_buffer_size = 0;
- MPV_common_init(s);
+ if (s1->context_initialized){
+ s->picture_range_start += MAX_PICTURE_COUNT;
+ s->picture_range_end += MAX_PICTURE_COUNT;
+ MPV_common_init(s);
+ }
}
s->avctx->coded_height = s1->avctx->coded_height;