]> git.sesse.net Git - ffmpeg/commitdiff
pthreads: reset got_frames on flush.
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 23 Jan 2012 02:39:59 +0000 (03:39 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 23 Jan 2012 18:47:49 +0000 (19:47 +0100)
This fixes memory corruption when seeking in broken streams.
a random mpeg4 in nut file was used to debug.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/pthread.c

index 35f8137f035f1ad17fa9df82d1fee696e18d688c..070dbffc1fed19eeb3c865079381739e89272120 100644 (file)
@@ -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;
     }
 }