vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlc...@free.fr> | Mon Dec 
17 18:27:44 2018 +0100| [0bfd5377a7ffe8ee0af20bb1d298598cb9648f8c] | committer: 
Hugo Beauzée-Luyssen

codec: dav1d: proper handling of drain

refs #21568

(cherry picked from commit de9b68e2cbb0c08e5d901179931386cc536e9cfc)
Signed-off-by: Hugo Beauzée-Luyssen <h...@beauzee.fr>

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

 modules/codec/dav1d.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/modules/codec/dav1d.c b/modules/codec/dav1d.c
index 3307d9d087..3fb966b8ea 100644
--- a/modules/codec/dav1d.c
+++ b/modules/codec/dav1d.c
@@ -247,6 +247,13 @@ static int Decode(decoder_t *dec, block_t *block)
             i_ret = VLC_EGENERIC;
             break;
         }
+
+        /* on drain, we must ignore the 1st EAGAIN */
+        if(!b_draining && (res == -EAGAIN || res == 0) && (p_data == NULL))
+        {
+            b_draining = true;
+            res = 0;
+        }
     } while (res == 0 || (p_data && p_data->sz != 0));
 
 

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to