summaryrefslogtreecommitdiffstats
path: root/src/pulse/sample.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulse/sample.c')
-rw-r--r--src/pulse/sample.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pulse/sample.c b/src/pulse/sample.c
index 0f19f8eb..d5d38eda 100644
--- a/src/pulse/sample.c
+++ b/src/pulse/sample.c
@@ -125,6 +125,10 @@ int pa_sample_spec_equal(const pa_sample_spec*a, const pa_sample_spec*b) {
pa_assert(b);
pa_return_val_if_fail(pa_sample_spec_valid(a), 0);
+
+ if (PA_UNLIKELY(a == b))
+ return 1;
+
pa_return_val_if_fail(pa_sample_spec_valid(b), 0);
return