# HG changeset patch # User reimar # Date 1337361244 0 # Node ID becaa4804918d18258827eff01d014b77d7b32f9 # Parent ef7be22beabe633e7dfa1731a51ae7f8259f0462 Return a spf value even when srate is NULL. Based on patch by Benot Thbaudeau [benoit thebaudeau advansee com] diff -r ef7be22beabe -r becaa4804918 libmpdemux/mp3_hdr.c --- a/libmpdemux/mp3_hdr.c Fri May 18 17:03:09 2012 +0000 +++ b/libmpdemux/mp3_hdr.c Fri May 18 17:14:04 2012 +0000 @@ -123,19 +123,18 @@ framesize += padding; // if(framesize<=0 || framesize>MAXFRAMESIZE) return FALSE; - if(srate) { + if(srate) *srate = freqs[sampling_frequency]; if(spf) { if(layer == 1) *spf = 384; else if(layer == 2) *spf = 1152; - else if(*srate < 32000) + else if(sampling_frequency > 2) // not 1.0 *spf = 576; else *spf = 1152; } - } if(mpa_layer) *mpa_layer = layer; if(chans) *chans = stereo; if(br) *br = bitrate;