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

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


Not necessarily. You could miss some flags as a result of discarding an empty block.

Le 12 février 2019 13:37:56 GMT+02:00, Thomas Guillem <thomas at gllm.fr> a écrit :
>
>On Tue, Feb 12, 2019, at 12:25, Rémi Denis-Courmont wrote:
>> 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.
>
>Yes, but do we agree that is useless to try to play them ?
>
>> 
>> 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);
>> 
>> -- 
>> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez
>excuser ma brièveté. 
>> _______________________________________________
>> 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/79b1ba4a/attachment.html>


More information about the vlc-devel mailing list