aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-18 02:56:29 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-18 16:47:29 +0100
commit1a947dfa8347b3b1fe0f5bd699a10fe3dfe0ff50 (patch)
treee6b50e3577309ee25f58640c9cf4b22523c5b7ef /libavcodec
parentf48cddfe4cf04e2d6e802d12e973301ff5a1a9a8 (diff)
downloadffmpeg-1a947dfa8347b3b1fe0f5bd699a10fe3dfe0ff50.tar.gz
ff_mpeg_update_thread_context: assert context unequality
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpegvideo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index f496e830a2..885226ac61 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -536,6 +536,8 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst,
if (dst == src)
return 0;
+ av_assert0(s != s1);
+
// FIXME can parameters change on I-frames?
// in that case dst may need a reinit
if (!s->context_initialized) {
@@ -570,6 +572,7 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst,
s->picture_number = s1->picture_number;
s->input_picture_number = s1->input_picture_number;
+ av_assert0(!s->picture || s->picture != s1->picture);
memcpy(s->picture, s1->picture, s1->picture_count * sizeof(Picture));
memcpy(&s->last_picture, &s1->last_picture,
(char *) &s1->last_picture_ptr - (char *) &s1->last_picture);