[vlc-commits] codec: dav1d: proper handling of drain
Francois Cartegnie
git at videolan.org
Mon Dec 17 18:32:20 CET 2018
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Dec 17 18:27:44 2018 +0100| [de9b68e2cbb0c08e5d901179931386cc536e9cfc] | committer: Francois Cartegnie
codec: dav1d: proper handling of drain
refs #21568
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=de9b68e2cbb0c08e5d901179931386cc536e9cfc
---
modules/codec/dav1d.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/modules/codec/dav1d.c b/modules/codec/dav1d.c
index c47f1d1575..d3fa58b3dc 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));
More information about the vlc-commits
mailing list