[FFmpeg-devel] [PATCH] pthreads: reset got_frames on flush.

Michael Niedermayer michaelni at gmx.at
Mon Jan 23 04:56:34 CET 2012


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 at gmx.at>
---
 libavcodec/pthread.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 35f8137..070dbff 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;
     }
 }
 
-- 
1.7.5.4



More information about the ffmpeg-devel mailing list