]> git.vomp.tv Git - vompclient-marten.git/commitdiff
Additional mp3 sanity check as suggested by winschrott
authorMarten Richter <marten.richter@freenet.de>
Thu, 26 Dec 2013 09:44:03 +0000 (10:44 +0100)
committerMarten Richter <marten.richter@freenet.de>
Thu, 26 Dec 2013 09:44:03 +0000 (10:44 +0100)
audioomx.cc

index 4703bbf15cfbda39b869ceff425c2ecc1d1b401c..5653b5e1b3d1728220331421e4bd5c545677b5b5 100644 (file)
@@ -1581,6 +1581,7 @@ unsigned int AudioOMX::AdvanceMpAudioSync(const UCHAR *data,unsigned int size,un
        //inspired by libav parsing code
        while (test+1<size) {
                if (data[test]==0xFF && (data[test+1] &0xe0)==0xe0) {
+                       if ((data[test+1] & 0x18) == 0x08) {test++;continue;}  //sanity check: mpeg version ID 01 -> reserved
                        //sanity check inspired by libav