[xiph-commits] r18312 - icecast/trunk/libshout/src
gmaxwell at svn.xiph.org
gmaxwell at svn.xiph.org
Thu May 24 14:09:48 PDT 2012
Author: gmaxwell
Date: 2012-05-24 14:09:47 -0700 (Thu, 24 May 2012)
New Revision: 18312
Modified:
icecast/trunk/libshout/src/opus.c
Log:
opus.c: don't memcmp bytes which are not there.
Modified: icecast/trunk/libshout/src/opus.c
===================================================================
--- icecast/trunk/libshout/src/opus.c 2012-05-24 20:46:09 UTC (rev 18311)
+++ icecast/trunk/libshout/src/opus.c 2012-05-24 21:09:47 UTC (rev 18312)
@@ -242,7 +242,7 @@
sanely handle non-zero starttimes and slightly saner behavior
on files with holes. */
while (ogg_stream_packetout (&codec->os, &packet) > 0){
- if(packet.bytes>0 && memcmp(packet.packet, "Op",2)!=0){
+ if(packet.bytes>0 && (packet.bytes<2 || memcmp(packet.packet, "Op",2)!=0)){
int32_t spf;
spf = packet_get_samples_per_frame(packet.packet,48000);
if(spf>0){
More information about the commits
mailing list