[vlc-devel] [PATCH 1/1] aom: flush decoder on close
Tristan Matthews
tmatth at videolan.org
Tue Jul 3 09:24:24 CEST 2018
Fixes #20788
---
modules/codec/aom.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/modules/codec/aom.c b/modules/codec/aom.c
index eba929531d..147fbb51d3 100644
--- a/modules/codec/aom.c
+++ b/modules/codec/aom.c
@@ -317,6 +317,13 @@ static void CloseDecoder(vlc_object_t *p_this)
decoder_t *dec = (decoder_t *)p_this;
decoder_sys_t *sys = dec->p_sys;
+ /* Flush decoder */
+ aom_codec_err_t err = aom_codec_decode(&sys->ctx, NULL, 0, NULL);
+ if (err != AOM_CODEC_OK)
+ {
+ AOM_ERR(p_this, &sys->ctx, "Failed to flush decoder");
+ }
+
/* Free our PTS */
const void *iter = NULL;
for (;;) {
--
2.18.0
More information about the vlc-devel
mailing list