From a0e20d647c1c5b00ab01ba9a8b06d736992d2256 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Sat, 20 Feb 2010 16:45:51 +0100 Subject: check if audio is ac3 --- dxr3device.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dxr3device.c b/dxr3device.c index 4d933ad..bcbf70b 100644 --- a/dxr3device.c +++ b/dxr3device.c @@ -249,7 +249,13 @@ int cDxr3Device::PlayAudio(const uchar *Data, int Length, uchar Id) cDxr3PesFrame frame; frame.parse(Data, Length); - aDecoder->decode(&frame, audioOut); + bool isAc3 = ((Id & 0xF0) == 0x80) || Id == 0xbd; + + if (!isAc3) { + aDecoder->decode(&frame, audioOut); + } else { + isyslog("[dxr3-device] ac3 is not supported"); + } return Length; } -- cgit v1.2.3