[vlc-devel] [PATCH 06/10] aout: add aout_FormatEquals
Thomas Guillem
thomas at gllm.fr
Tue Mar 19 17:45:21 CET 2019
---
src/audio_output/dec.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index 854ed2271c..71a6ca56ca 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -50,6 +50,21 @@ static void aout_Drain(audio_output_t *aout)
}
}
+static bool aout_FormatEquals(const audio_sample_format_t *f1,
+ const audio_sample_format_t *f2)
+{
+ return f1->i_format == f2->i_format
+ && f1->i_rate == f2->i_rate
+ && f1->i_physical_channels == f2->i_physical_channels
+ && f1->i_chan_mode == f2->i_chan_mode
+ && f1->channel_type == f2->channel_type
+ && f1->i_bytes_per_frame == f2->i_bytes_per_frame
+ && f1->i_frame_length == f2->i_frame_length
+ && f1->i_bitspersample == f2->i_bitspersample
+ && f1->i_blockalign == f2->i_blockalign
+ && f1->i_channels == f2->i_channels;
+}
+
/**
* Creates an audio output
*/
--
2.20.1
More information about the vlc-devel
mailing list