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

codec: dav1d: don't send null data for drain

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

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

 modules/codec/dav1d.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/modules/codec/dav1d.c b/modules/codec/dav1d.c
index 748aa8143a..3307d9d087 100644
--- a/modules/codec/dav1d.c
+++ b/modules/codec/dav1d.c
@@ -213,12 +213,15 @@ static int Decode(decoder_t *dec, block_t *block)
     int i_ret = VLCDEC_SUCCESS;
     int res;
     do {
-        res = dav1d_send_data(p_sys->c, p_data);
-        if (res < 0 && res != -EAGAIN)
+        if( p_data )
         {
-            msg_Err(dec, "Decoder feed error %d!", res);
-            i_ret = VLC_EGENERIC;
-            break;
+            res = dav1d_send_data(p_sys->c, p_data);
+            if (res < 0 && res != -EAGAIN)
+            {
+                msg_Err(dec, "Decoder feed error %d!", res);
+                i_ret = VLC_EGENERIC;
+                break;
+            }
         }
 
         res = dav1d_get_picture(p_sys->c, &img);

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

Reply via email to