diff options
author | Johns <johns98@gmx.net> | 2012-02-05 14:17:46 +0100 |
---|---|---|
committer | Johns <johns98@gmx.net> | 2012-02-05 14:17:46 +0100 |
commit | 7d38dff5bfc355fba9c612af58657b330b4eb2e8 (patch) | |
tree | 61ae5501690790f8f356dcd90d18525d1667ecf6 /softhddev.c | |
parent | 8db8b68edd6043b73fbe601a9567b0d4979b7195 (diff) | |
download | vdr-plugin-softhddevice-7d38dff5bfc355fba9c612af58657b330b4eb2e8.tar.gz vdr-plugin-softhddevice-7d38dff5bfc355fba9c612af58657b330b4eb2e8.tar.bz2 |
Detect dvb LPCM stream and ignore it.
Diffstat (limited to 'softhddev.c')
-rw-r--r-- | softhddev.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/softhddev.c b/softhddev.c index 32a21b9..b7af321 100644 --- a/softhddev.c +++ b/softhddev.c @@ -261,7 +261,7 @@ int PlayAudio(const uint8_t * data, int size, return osize; } // Detect audio code - // MPEG-PS mp2 MPEG1, MPEG2, AC3 + // MPEG-PS mp2 MPEG1, MPEG2, AC3, LPCM // Syncword - 0x0B77 if (data[0] == 0x0B && data[1] == 0x77) { @@ -279,6 +279,14 @@ int PlayAudio(const uint8_t * data, int size, CodecAudioOpen(MyAudioDecoder, NULL, CODEC_ID_MP2); AudioCodecID = CODEC_ID_MP2; } + // Private stram + LPCM ID + } else if (data[-n - 9 + 3] == 0xBD && data[0] == 0xA0) { + if (AudioCodecID != CODEC_ID_PCM_DVD) { + Debug(3, "[softhddev]%s: LPCM %d\n", __FUNCTION__, id); + CodecAudioClose(MyAudioDecoder); + //CodecAudioOpen(MyAudioDecoder, NULL, CODEC_ID_PCM_DVD); + AudioCodecID = CODEC_ID_PCM_DVD; + } } else { // no start package // FIXME: Nick/Viva sends this shit, need to find sync in packet @@ -307,8 +315,9 @@ int PlayAudio(const uint8_t * data, int size, avpkt->data = (void *)data; avpkt->size = size; - //memset(avpkt->data + avpkt->size, 0, FF_INPUT_BUFFER_PADDING_SIZE); - CodecAudioDecode(MyAudioDecoder, avpkt); + if (AudioCodecID != CODEC_ID_PCM_DVD) { + CodecAudioDecode(MyAudioDecoder, avpkt); + } return osize; } |