[vlc-commits] codec: dav1d: use provided error value macro
Francois Cartegnie
git at videolan.org
Wed Feb 12 19:15:59 CET 2020
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Feb 12 18:12:12 2020 +0100| [b7b240151a8432f79efbae4e2bbc793dacefb1b1] | committer: Francois Cartegnie
codec: dav1d: use provided error value macro
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b7b240151a8432f79efbae4e2bbc793dacefb1b1
---
modules/codec/dav1d.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/modules/codec/dav1d.c b/modules/codec/dav1d.c
index 87a5b663d0..7e1331ebbc 100644
--- a/modules/codec/dav1d.c
+++ b/modules/codec/dav1d.c
@@ -225,7 +225,7 @@ static int Decode(decoder_t *dec, block_t *block)
if( p_data )
{
res = dav1d_send_data(p_sys->c, p_data);
- if (res < 0 && res != -EAGAIN)
+ if (res < 0 && res != DAV1D_ERR(EAGAIN))
{
msg_Err(dec, "Decoder feed error %d!", res);
i_ret = VLC_EGENERIC;
@@ -250,7 +250,7 @@ static int Decode(decoder_t *dec, block_t *block)
decoder_QueueVideo(dec, pic);
dav1d_picture_unref(&img);
}
- else if (res != -EAGAIN)
+ else if (res != DAV1D_ERR(EAGAIN))
{
msg_Err(dec, "Decoder error %d!", res);
i_ret = VLC_EGENERIC;
@@ -258,7 +258,8 @@ static int Decode(decoder_t *dec, block_t *block)
}
/* on drain, we must ignore the 1st EAGAIN */
- if(!b_draining && (res == -EAGAIN || res == 0) && (p_data == NULL||b_eos))
+ if(!b_draining && (res == DAV1D_ERR(EAGAIN) || res == 0)
+ && (p_data == NULL||b_eos))
{
b_draining = true;
res = 0;
More information about the vlc-commits
mailing list