diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-17 23:16:05 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-17 23:16:05 +0100 |
commit | 967bdb8572f27b9891fe7bd9b8489146a906633d (patch) | |
tree | 61b486be897a4503f71e2ecc7734f16930dc1a94 /libavcodec/pthread.c | |
parent | 219a6fb61cb9e6f534f20dc3313442f89b0ffd42 (diff) | |
parent | 6ca3b248e21fc48418c4221fc92c2eecaf07cb9b (diff) | |
download | ffmpeg-967bdb8572f27b9891fe7bd9b8489146a906633d.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
resample: allocate a large enough output buffer
fate: fix enc_dec_pcm tests with remote target
wmaenc: remove bit-exact hack
FATE: remove WMA acodec tests
FATE: add WMAv1 and WMAv2 encode/decode tests with fuzzy comparison
FATE: add AC-3 and E-AC-3 encode/decode tests with fuzzy comparison
qtrle: Use bytestream2 functions to prevent buffer overreads.
vqavideo: check malloc return values
x11grab: fix a memory leak exposed by valgrind
threads: fix old frames returned after avcodec_flush_buffers()
MPV: always mark dummy frames as reference
h264: fix deadlocks on incomplete reference frame decoding.
mpeg4: report frame decoding completion at ff_MPV_frame_end().
mimic: don't use self as reference, and report completion at end of decode().
Conflicts:
libavcodec/h264.c
libavcodec/qtrle.c
libavcodec/resample.c
libavcodec/vqavideo.c
libavdevice/x11grab.c
tests/ref/seek/wmav1_asf
tests/ref/seek/wmav2_asf
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/pthread.c')
-rw-r--r-- | libavcodec/pthread.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c index c4e8aab952..d02f6844b4 100644 --- a/libavcodec/pthread.c +++ b/libavcodec/pthread.c @@ -909,6 +909,9 @@ void ff_thread_flush(AVCodecContext *avctx) fctx->next_decoding = fctx->next_finished = 0; fctx->delaying = 1; fctx->prev_thread = NULL; + // Make sure decode flush calls with size=0 won't return old frames + for (int i = 0; i < avctx->thread_count; i++) + fctx->threads[i].got_frame = 0; } static int *allocate_progress(PerThreadContext *p) |