Ok, don't use memcmp for comparing audio formats!

git-svn-id: https://svn.musicpd.org/mpd/trunk@4591 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
J. Alexander Treuman 2006-08-07 20:00:00 +00:00
parent 7cf28560e1
commit 5f827ac126

View File

@ -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;
}