aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/pthread.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-16 03:44:00 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-16 04:02:09 +0200
commit2822361ed1fe18b03a35dfdbda811de6bd919e0a (patch)
tree353c0ad65fd1a4c151e2c7cb02c415f56b8e75eb /libavcodec/pthread.c
parent647ec6fc0308ccfc86ad48b1d7d20d85ddf6825c (diff)
parent91038cdbd160310174aad6833d1d08c65d850e78 (diff)
downloadffmpeg-2822361ed1fe18b03a35dfdbda811de6bd919e0a.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: prores: get correct size for coded V plane if alpha is present prores: do not set pixel format on codec init pthread: prevent updating AVCodecContext from itself in frame_thread_free pthread: copy coded frame dimensions in update_context_from_thread vp8: prevent read from uninitialized memory in decode_mvs vp8: force reallocation in update_thread_context after frame size change vp8: fix return value if update_dimensions fails matroskadec: fix out of bounds write adpcmdec: calculate actual number of output samples for each decoder. adpcmdec: check remaining buffer size before decoding next block in the ADPCM IMA WAV decoder. adpcmdec: do not terminate early in ADPCM IMA Duck DK3 decoder. adpcmdec: remove unneeded buf_size==0 check. adpcmdec: remove unneeded zeroing of *data_size dnxhdenc: fixed signed multiplication overflow Conflicts: tests/ref/fate/prores-alpha tests/ref/fate/truemotion1-24 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/pthread.c')
-rw-r--r--libavcodec/pthread.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 454e51f555..f8a8ee2249 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -333,6 +333,9 @@ static int update_context_from_thread(AVCodecContext *dst, AVCodecContext *src,
dst->height = src->height;
dst->pix_fmt = src->pix_fmt;
+ dst->coded_width = src->coded_width;
+ dst->coded_height = src->coded_height;
+
dst->has_b_frames = src->has_b_frames;
dst->idct_algo = src->idct_algo;
dst->slice_count = src->slice_count;
@@ -635,7 +638,7 @@ static void frame_thread_free(AVCodecContext *avctx, int thread_count)
park_frame_worker_threads(fctx, thread_count);
- if (fctx->prev_thread)
+ if (fctx->prev_thread && fctx->prev_thread != fctx->threads)
update_context_from_thread(fctx->threads->avctx, fctx->prev_thread->avctx, 0);
fctx->die = 1;