diff options
author | Dale Curtis <dalecurtis@chromium.org> | 2012-04-12 17:12:27 -0700 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2012-04-12 21:32:01 -0700 |
commit | 97ae370078e5ee8e78269fe4d7b4f457e82bd758 (patch) | |
tree | 0bb2ae3c477dbf074780115ab26686d9e999592f /libavcodec/pthread.c | |
parent | 27c2fb0f721efb61f65017efa82c32c12de4287b (diff) | |
download | ffmpeg-97ae370078e5ee8e78269fe4d7b4f457e82bd758.tar.gz |
pthread: Fix crash due to fctx->delaying not being cleared.
Reproducible with test case and ffplay -threads 2. Stack trace:
http://pastebin.com/PexZ4Uc0
Test case:
http://commondatastorage.googleapis.com/dalecurtis-shared/crash.ogm
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavcodec/pthread.c')
-rw-r--r-- | libavcodec/pthread.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c index ee7bdb5310..dc9220adc4 100644 --- a/libavcodec/pthread.c +++ b/libavcodec/pthread.c @@ -603,11 +603,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; } /* |