aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-17 00:00:34 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-17 00:21:58 +0100
commit97d190283ee233e32b805e57434adfac64dabc17 (patch)
treec7a559e4f74c4aaac948601ef1f06497d384ad54 /libavcodec/h264.c
parentf674cc776f201973c81c5c44d72f164d2bc029c1 (diff)
downloadffmpeg-97d190283ee233e32b805e57434adfac64dabc17.tar.gz
h264: always copy linesizes in thread update
Fixes inconsistencies in context Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 6cfb4ac67d..3ad6b2a8ea 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1216,15 +1216,15 @@ static int decode_update_thread_context(AVCodecContext *dst,
}
h->context_reinitialized = 1;
- /* update linesize on resize for h264. The h264 decoder doesn't
- * necessarily call ff_MPV_frame_start in the new thread */
- s->linesize = s1->linesize;
- s->uvlinesize = s1->uvlinesize;
-
h264_set_parameter_from_sps(h);
//Note we set context_reinitialized which will cause h264_set_parameter_from_sps to be reexecuted
h->cur_chroma_format_idc = h1->cur_chroma_format_idc;
}
+ /* update linesize on resize for h264. The h264 decoder doesn't
+ * necessarily call ff_MPV_frame_start in the new thread */
+ s->linesize = s1->linesize;
+ s->uvlinesize = s1->uvlinesize;
+
/* copy block_offset since frame_start may not be called */
memcpy(h->block_offset, h1->block_offset, sizeof(h->block_offset));