summaryrefslogtreecommitdiff
path: root/src/combined
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2012-02-01 20:23:46 +0000
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2012-02-01 20:23:46 +0000
commit394844752785840a9a2f50febcaf58f9b8cbc0a7 (patch)
tree17043c162190989571f15f7e7c4c5461b674a0b5 /src/combined
parent24336d54166a06db00d5e9b24a4039a1760e9d1d (diff)
parent15029f2439781c5da7ffcdf18e39ea8ea92b17e9 (diff)
downloadxine-lib-394844752785840a9a2f50febcaf58f9b8cbc0a7.tar.gz
xine-lib-394844752785840a9a2f50febcaf58f9b8cbc0a7.tar.bz2
Merge from 1.1.
Diffstat (limited to 'src/combined')
-rw-r--r--src/combined/ffmpeg/ff_video_decoder.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c
index 6d972fdc7..92bdee95a 100644
--- a/src/combined/ffmpeg/ff_video_decoder.c
+++ b/src/combined/ffmpeg/ff_video_decoder.c
@@ -1615,8 +1615,22 @@ static void ff_reset (video_decoder_t *this_gen) {
this->size = 0;
if(this->context && this->decoder_ok)
+ {
+ xine_list_iterator_t it;
+ AVFrame *av_frame;
+
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 )
+ {
+ av_frame = (AVFrame *)xine_list_get_value(this->dr1_frames, it);
+ release_buffer(this->context, av_frame);
+ }
+ xine_list_clear(this->dr1_frames);
+ }
+
if (this->is_mpeg12)
mpeg_parser_reset(this->mpeg_parser);