muhku / FreeStreamer

A low-memory footprint streaming audio player for iOS and OS X
http://muhku.github.io/FreeStreamer/
Other
2.11k stars 434 forks source link

Fix crash of 389 ( https://github.com/muhku/FreeStreamer/issues/389 ) #390

Closed lefex closed 6 years ago

lefex commented 6 years ago

if (kCFCompareEqualTo == CFStringCompareWithOptions(contentType, audioContentType, CFRangeMake(0, CFStringGetLength(audioContentType)),0)) { matchesAudioContentType = true; }

The CFStringCompareWithOptions fun will crash when contentType length less than audioContentType .

lefex commented 6 years ago

In my project .contentType is "audio" while audioContentType is "audio/" . It will crashed.

muhku commented 6 years ago

Thanks.