summaryrefslogtreecommitdiff
path: root/softhddev.c
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2012-02-05 14:17:46 +0100
committerJohns <johns98@gmx.net>2012-02-05 14:17:46 +0100
commit7d38dff5bfc355fba9c612af58657b330b4eb2e8 (patch)
tree61ae5501690790f8f356dcd90d18525d1667ecf6 /softhddev.c
parent8db8b68edd6043b73fbe601a9567b0d4979b7195 (diff)
downloadvdr-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.c15
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;
}