[vlc-devel] [PATCH 2/2] aout: don't play empty buffers
Steve Lhomme
robux4 at ycbcr.xyz
Tue Feb 12 10:18:15 CET 2019
On 12/02/2019 10:02, Thomas Guillem wrote:
> Other possible fix: put an assert and fix the filters that send empty blocks.
Or both. So that in release builds it doesn't do useless stuff but in
debug builds we know we have to clean things.
> ---
> 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
More information about the vlc-devel
mailing list