summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTorsten Jager <t.jager@gmx.de>2012-06-25 22:13:29 +0300
committerTorsten Jager <t.jager@gmx.de>2012-06-25 22:13:29 +0300
commit6282546e5a492bbba815c2f11e87ef90a04b3fd6 (patch)
treea22342dc2a112d711fff9b07270402aebb3de4fa /src
parent0b831c053e03fe9c76fc7e4347f9101c19c38a50 (diff)
downloadxine-lib-6282546e5a492bbba815c2f11e87ef90a04b3fd6.tar.gz
xine-lib-6282546e5a492bbba815c2f11e87ef90a04b3fd6.tar.bz2
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.
Diffstat (limited to 'src')
-rw-r--r--src/combined/ffmpeg/ff_video_decoder.c8
1 files changed, 4 insertions, 4 deletions
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)