From: Michael Niedermayer Date: Mon, 23 Jan 2012 02:39:59 +0000 (+0100) Subject: pthreads: reset got_frames on flush. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=575d494de561049f36f9c5492e05c7d83dd78e75;p=ffmpeg pthreads: reset got_frames on flush. This fixes memory corruption when seeking in broken streams. a random mpeg4 in nut file was used to debug. Signed-off-by: Michael Niedermayer --- diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c index 35f8137f035..070dbffc1fe 100644 --- a/libavcodec/pthread.c +++ b/libavcodec/pthread.c @@ -731,6 +731,7 @@ static void park_frame_worker_threads(FrameThreadContext *fctx, int thread_count pthread_cond_wait(&p->output_cond, &p->progress_mutex); pthread_mutex_unlock(&p->progress_mutex); } + p->got_frame = 0; } }