diff options
author | Jochen Dolze <vdr@dolze.de> | 2012-09-10 14:54:27 +0200 |
---|---|---|
committer | Jochen Dolze <vdr@dolze.de> | 2012-09-10 14:54:27 +0200 |
commit | 285eeeed580f82bee7ea769df2e737ceda56a8b9 (patch) | |
tree | 4e7b1e4df8de9b8553f3ea2e508708018d43039e /command/demux.cpp | |
parent | 18519ae5a0c87283527a1fd9f57d2ce146dc471e (diff) | |
download | vdr-plugin-markad-285eeeed580f82bee7ea769df2e737ceda56a8b9.tar.gz vdr-plugin-markad-285eeeed580f82bee7ea769df2e737ceda56a8b9.tar.bz2 |
Code cleanups
Diffstat (limited to 'command/demux.cpp')
-rw-r--r-- | command/demux.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/command/demux.cpp b/command/demux.cpp index 2ee198b..b136d17 100644 --- a/command/demux.cpp +++ b/command/demux.cpp @@ -70,7 +70,7 @@ void cPaketQueue::Resize(int NewSize, const char *NewName) uchar *tmp=(uchar *) realloc(buffer,NewSize+8); if (tmp) { - buffer=tmp; + buffer=tmp; maxqueue=NewSize; } else @@ -288,25 +288,6 @@ int cPaketQueue::findaudioheader(int start, int *framesize, int *headersize, boo if (framesize) { - int bitRates[3][3][16] = // all values are specified as kbits/s - { - { - { 0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, -1 }, // M1, L1 - { 0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, -1 }, // M1, L2 - { 0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1 } // M1, L3 - }, - { - { 0, 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256, -1 }, // M2, L1 - { 0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, -1 }, // M2, L2 - { 0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, -1 } // M2, L3 - }, - { - { 0, 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256, -1 }, // M2.5, L1 - { 0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, -1 }, // M2.5, L2 - { 0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, -1 } // M2.5, L3 - } - }; - int samplingFrequencies[3][4] = // all values are specified in Hz { { 44100, 48000, 32000, -1 }, // MPEG 1 @@ -347,6 +328,25 @@ int cPaketQueue::findaudioheader(int start, int *framesize, int *headersize, boo *framesize = 0; // "free" Bitrate -> we don't support this! else { + int bitRates[3][3][16] = // all values are specified as kbits/s + { + { + { 0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, -1 }, // M1, L1 + { 0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, -1 }, // M1, L2 + { 0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1 } // M1, L3 + }, + { + { 0, 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256, -1 }, // M2, L1 + { 0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, -1 }, // M2, L2 + { 0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, -1 } // M2, L3 + }, + { + { 0, 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256, -1 }, // M2.5, L1 + { 0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, -1 }, // M2.5, L2 + { 0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, -1 } // M2.5, L3 + } + }; + int br = 1000 * bitRates[mpegIndex][layerIndex][mp2hdr->BitRateIndex]; // bits/s int N = slots_per_frame[mpegIndex][layerIndex] * br / sf; // slots |