mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-12 10:00:08 +01:00
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.ogm Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
committed by
Michael Niedermayer
parent
e9dc616472
commit
a9d114dc8a
@@ -614,10 +614,11 @@ int ff_thread_decode_frame(AVCodecContext *avctx,
|
|||||||
* If we're still receiving the initial packets, don't return a frame.
|
* 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;
|
if (fctx->next_decoding >= (avctx->thread_count-1)) fctx->delaying = 0;
|
||||||
|
|
||||||
*got_picture_ptr=0;
|
*got_picture_ptr=0;
|
||||||
|
if (avpkt->size)
|
||||||
return avpkt->size;
|
return avpkt->size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user