aboutsummaryrefslogtreecommitdiffstats
path: root/src/audio.c
diff options
context:
space:
mode:
authorJ. Alexander Treuman <jat@spatialrift.net>2006-08-07 20:00:00 +0000
committerJ. Alexander Treuman <jat@spatialrift.net>2006-08-07 20:00:00 +0000
commit5f827ac126ef98847bf7b3da5068d1046ef14dc3 (patch)
tree174e11da6db51bb207fa69ec87a1b4fbaca64f78 /src/audio.c
parent7cf28560e1b762d86aebb2ae898bc2d22e3aff32 (diff)
downloadmpd-5f827ac126ef98847bf7b3da5068d1046ef14dc3.tar.gz
mpd-5f827ac126ef98847bf7b3da5068d1046ef14dc3.tar.xz
mpd-5f827ac126ef98847bf7b3da5068d1046ef14dc3.zip
Ok, don't use memcmp for comparing audio formats!
git-svn-id: https://svn.musicpd.org/mpd/trunk@4591 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/audio.c')
-rw-r--r--src/audio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/audio.c b/src/audio.c
index 30d9277e6..ca36cb126 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -84,7 +84,8 @@ void copyAudioFormat(AudioFormat * dest, AudioFormat * src)
int cmpAudioFormat(AudioFormat * f1, AudioFormat * f2)
{
- if (f1 && f2 && (0 == memcmp(f1, f2, sizeof(AudioFormat))))
+ if (f1 && f2 && (f1->sampleRate == f2->sampleRate) &&
+ (f1->bits == f2->bits) && (f1->channels == f2->channels))
return 0;
return 1;
}