From: Torsten J. <t....@gm...> - 2013-11-07 15:57:11
|
# HG changeset patch # User Torsten Jager <t....@gm...> # Date 1383839780 -3600 # Node ID 307540c05d67dc78f654206e048d57d5e373047c # Branch default # Parent 1f5d65dadfa8e9d41629406a6b1ec44fb0dad43d video_dec_libvpx: flush undisplayed frames on reset. diff --git a/src/video_dec/libvpx.c b/src/video_dec/libvpx.c --- a/src/video_dec/libvpx.c +++ b/src/video_dec/libvpx.c @@ -213,6 +213,17 @@ { 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; } |