summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTorsten Jager <t.jager@gmx.de>2013-11-07 16:56:20 +0100
committerTorsten Jager <t.jager@gmx.de>2013-11-07 16:56:20 +0100
commitae116f8511fed68ebb93bc36f5518cc1dba33f43 (patch)
treef8f668f9424e100fa79a452ce927b619f5d912e6 /src
parent3ee5db520715f8dfddc377951950e45ce3ad39d2 (diff)
downloadxine-lib-ae116f8511fed68ebb93bc36f5518cc1dba33f43.tar.gz
xine-lib-ae116f8511fed68ebb93bc36f5518cc1dba33f43.tar.bz2
video_dec_libvpx: flush undisplayed frames on reset.
Diffstat (limited to 'src')
-rw-r--r--src/video_dec/libvpx.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/video_dec/libvpx.c b/src/video_dec/libvpx.c
index eafd0e315..eb8ac02b5 100644
--- a/src/video_dec/libvpx.c
+++ b/src/video_dec/libvpx.c
@@ -213,6 +213,17 @@ static void vpx_reset (video_decoder_t *this_gen)
{
vpx_decoder_t *this = (vpx_decoder_t *) this_gen;
+ if (this->decoder_ok) {
+ const void *iter = NULL;
+ while (1) {
+ struct vpx_image *img = vpx_codec_get_frame(&this->ctx, &iter);
+ if (!img)
+ break;
+ free(img->user_priv);
+ img->user_priv = NULL;
+ }
+ }
+
this->size = 0;
}