[vlc-devel] [PATCH 2/2] aout: don't play empty buffers

Rémi Denis-Courmont remi at remlab.net
Tue Feb 12 12:25:12 CET 2019


We never really specified whether or when a block could be empty, so you can't really say it's a bug in the source rather than the sink.

Le 12 février 2019 11:02:31 GMT+02:00, Thomas Guillem <thomas at gllm.fr> a écrit :
>Other possible fix: put an assert and fix the filters that send empty
>blocks.
>---
> src/audio_output/dec.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
>diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
>index b913ac18a0..e5aff4f691 100644
>--- a/src/audio_output/dec.c
>+++ b/src/audio_output/dec.c
>@@ -370,6 +370,11 @@ int aout_DecPlay(audio_output_t *aout, block_t
>*block)
>     block = aout_FiltersPlay(owner->filters, block, owner->sync.rate);
>     if (block == NULL)
>         goto lost;
>+    else if (unlikely(block->i_buffer == 0))
>+    {
>+        block_Release(block);
>+        return ret;
>+    }
> 
>     /* Software volume */
>     aout_volume_Amplify (owner->volume, block);
>-- 
>2.20.1
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190212/e867d05e/attachment.html>


More information about the vlc-devel mailing list