From 6282546e5a492bbba815c2f11e87ef90a04b3fd6 Mon Sep 17 00:00:00 2001 From: Torsten Jager Date: Mon, 25 Jun 2012 22:13:29 +0300 Subject: ff_video_decoder.c: fix: free _all_ DR1 frames Fixes laming/freezing after manually stopping VP6 or WMV video. That issue does not hit when we let the stream play to its end. --- src/combined/ffmpeg/ff_video_decoder.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c index ca3e488fa..4de2aeae8 100644 --- a/src/combined/ffmpeg/ff_video_decoder.c +++ b/src/combined/ffmpeg/ff_video_decoder.c @@ -1721,13 +1721,13 @@ static void ff_reset (video_decoder_t *this_gen) { if(this->context && this->decoder_ok) { - xine_list_iterator_t it; + xine_list_iterator_t it = NULL; avcodec_flush_buffers(this->context); /* frame garbage collector here - workaround for buggy ffmpeg codecs that * don't release their DR1 frames */ - while( (it = xine_list_front(this->dr1_frames)) != NULL ) + while ((it = xine_list_next (this->dr1_frames, it)) != NULL) { vo_frame_t *img = (vo_frame_t *)xine_list_get_value(this->dr1_frames, it); if (img) @@ -1791,7 +1791,7 @@ static void ff_dispose (video_decoder_t *this_gen) { lprintf ("ff_dispose\n"); if (this->decoder_ok) { - xine_list_iterator_t it; + xine_list_iterator_t it = NULL; pthread_mutex_lock(&ffmpeg_lock); avcodec_close (this->context); @@ -1799,7 +1799,7 @@ static void ff_dispose (video_decoder_t *this_gen) { /* frame garbage collector here - workaround for buggy ffmpeg codecs that * don't release their DR1 frames */ - while( (it = xine_list_front(this->dr1_frames)) != NULL ) + while ((it = xine_list_next (this->dr1_frames, it)) != NULL) { vo_frame_t *img = (vo_frame_t *)xine_list_get_value(this->dr1_frames, it); if (img) -- cgit v1.2.3