From bd392934097dc5c909e9b06550ec1d13d92fa134 Mon Sep 17 00:00:00 2001 From: Alexander Strange Date: Fri, 15 Aug 2008 23:34:32 -0400 Subject: [PATCH] Set output_size properly before calling the decoder so it doesn't return nonsense and crash at the end --- libavcodec/pthread.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c index 8ff46f3..76c01dc 100644 --- a/libavcodec/pthread.c +++ b/libavcodec/pthread.c @@ -228,6 +228,7 @@ static attribute_align_arg void *decode_frame_thread(void *arg) pthread_mutex_lock(&p->mutex); avcodec_get_frame_defaults(&p->result); + p->output_size = 0; p->output_res = codec->decode(avctx, &p->result, &p->output_size, p->input, p->input_size); if (p->state == STATE_PREDECODING) ff_report_predecode_done(avctx); //duplication -- 2.1.4