vlc | branch: master | Francois Cartegnie <[email protected]> | Mon Dec 17 18:28:11 2018 +0100| [0fb3aaeff3fdadf91a39dcdba4384bef94ee71aa] | committer: Francois Cartegnie
codec: dav1d: drain on EOS refs #21568 > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0fb3aaeff3fdadf91a39dcdba4384bef94ee71aa --- modules/codec/dav1d.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/codec/dav1d.c b/modules/codec/dav1d.c index d3fa58b3dc..cba241e064 100644 --- a/modules/codec/dav1d.c +++ b/modules/codec/dav1d.c @@ -192,6 +192,7 @@ static int Decode(decoder_t *dec, block_t *block) return VLCDEC_SUCCESS; } + bool b_eos = false; Dav1dData data; Dav1dData *p_data = NULL; @@ -206,10 +207,12 @@ static int Decode(decoder_t *dec, block_t *block) } vlc_tick_t pts = block->i_pts == VLC_TICK_INVALID ? block->i_dts : block->i_pts; p_data->m.timestamp = pts; + b_eos = (block->i_flags & BLOCK_FLAG_END_OF_SEQUENCE); } Dav1dPicture img = { 0 }; + bool b_draining = false; int i_ret = VLCDEC_SUCCESS; int res; do { @@ -249,7 +252,7 @@ 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)) + if(!b_draining && (res == -EAGAIN || res == 0) && (p_data == NULL||b_eos)) { b_draining = true; res = 0; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
