[vlc-devel] [RFC PATCH 4/5] aout: signal when a buffer is lost from a filter
Thomas Guillem
thomas at gllm.fr
Thu Feb 28 16:59:53 CET 2019
---
src/audio_output/dec.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index 0898487668..3f99580b74 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -364,7 +364,14 @@ int aout_DecPlay(audio_output_t *aout, block_t *block)
block = aout_FiltersPlay(owner->filters, block, owner->sync.rate);
if (block == NULL)
+ {
+ if (aout_FiltersFailed(owner->filters))
+ {
+ ret = AOUT_DEC_FAILED;
+ goto lost;
+ }
return ret;
+ }
/* Software volume */
aout_volume_Amplify (owner->volume, block);
@@ -380,6 +387,7 @@ int aout_DecPlay(audio_output_t *aout, block_t *block)
drop:
owner->sync.discontinuity = true;
block_Release (block);
+lost:
atomic_fetch_add_explicit(&owner->buffers_lost, 1, memory_order_relaxed);
return ret;
}
--
2.20.1
More information about the vlc-devel
mailing list