[vlc-devel] [PATCH V3 1/2] aout_filters: aggregate flags of all blocks

Thomas Guillem thomas at gllm.fr
Mon Mar 4 12:20:41 CET 2019


---
 src/audio_output/filters.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/audio_output/filters.c b/src/audio_output/filters.c
index b62cf93f04..da2d8472cb 100644
--- a/src/audio_output/filters.c
+++ b/src/audio_output/filters.c
@@ -278,6 +278,7 @@ static block_t *aout_FiltersPipelinePlay(filter_t *const *filters,
                                          unsigned count, block_t *block)
 {
     /* TODO: use filter chain */
+    uint32_t flags = block ? block->i_flags : 0;
     for (unsigned i = 0; (i < count) && (block != NULL); i++)
     {
         filter_t *filter = filters[i];
@@ -285,7 +286,11 @@ static block_t *aout_FiltersPipelinePlay(filter_t *const *filters,
         /* Please note that p_block->i_nb_samples & i_buffer
          * shall be set by the filter plug-in. */
         block = filter->pf_audio_filter (filter, block);
+        if (block)
+            flags |= block->i_flags;
     }
+    if (block)
+        block->i_flags = flags;
     return block;
 }
 
-- 
2.20.1



More information about the vlc-devel mailing list