[vlc-commits] codec: dav1d: don't send null data for drain

Francois Cartegnie git at videolan.org
Tue Dec 18 18:14:46 CET 2018


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at 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 <hugo at 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);



More information about the vlc-commits mailing list