From 5edbb32ff7ee2f5ad065057b22f882aaefb02df3 Mon Sep 17 00:00:00 2001 From: Marten Richter Date: Sun, 14 Apr 2013 17:54:35 +0200 Subject: [PATCH] Fix in mpeg audio header parsing code, pointed out by sirwio --- audioomx.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]) { -- 2.39.5