Commit a9d114dc authored by Dale Curtis's avatar Dale Curtis Committed by Michael Niedermayer

pthread: Fix crash due to fctx->delaying not being cleared.

corrects invalid return when avpkt->size == 0.

Reproducible with test case and ffplay -threads 2. Stack trace:
http://pastebin.com/PexZ4Uc0

Test case:
http://commondatastorage.googleapis.com/dalecurtis-shared/crash.ogmSigned-off-by: 's avatarDale Curtis <dalecurtis@chromium.org>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent e9dc6164
......@@ -614,11 +614,12 @@ int ff_thread_decode_frame(AVCodecContext *avctx,
* If we're still receiving the initial packets, don't return a frame.
*/
if (fctx->delaying && avpkt->size) {
if (fctx->delaying) {
if (fctx->next_decoding >= (avctx->thread_count-1)) fctx->delaying = 0;
*got_picture_ptr=0;
return avpkt->size;
if (avpkt->size)
return avpkt->size;
}
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment