summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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;
}