From: Marten Richter Date: Sun, 14 Apr 2013 15:54:35 +0000 (+0200) Subject: Fix in mpeg audio header parsing code, pointed out by sirwio X-Git-Url: https://git.vomp.tv/gitweb/?a=commitdiff_plain;h=5edbb32ff7ee2f5ad065057b22f882aaefb02df3;p=vompclient-marten.git Fix in mpeg audio header parsing code, pointed out by sirwio --- diff --git a/audioomx.cc b/audioomx.cc index 5c4ad05..dc8199c 100644 --- a/audioomx.cc +++ b/audioomx.cc @@ -1580,7 +1580,7 @@ unsigned int AudioOMX::AdvanceMpAudioSync(const UCHAR *data,unsigned int size,un 48, 56, 64, 80, 96, 112, 128, 144, 160 } } }; int lsf=0; int mpeg2=0; - int layer=4-(data[test+2]&0x03)>>1; + int layer=4-((data[test+1]&0x06)>>1); int bitrate_index=(data[test+2]&0xf0)>>4; int padding=(data[test+2]&2)>>1; if (0x10 & data[test+1]) {