[vlc-commits] aom: flush decoder on close

Tristan Matthews git at videolan.org
Tue Jul 3 09:49:16 CEST 2018


vlc | branch: master | Tristan Matthews <tmatth at videolan.org> | Tue Jul  3 03:23:06 2018 -0400| [a5b4bbb9f27c801d1fd1c9650d895c906c191841] | committer: Tristan Matthews

aom: flush decoder on close

Fixes #20788

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a5b4bbb9f27c801d1fd1c9650d895c906c191841
---

 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 (;;) {



More information about the vlc-commits mailing list