summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2011-11-13 08:49:34 +0000
committerphintuka <phintuka>2011-11-13 08:49:34 +0000
commit8e29c296e75f84d851eda8c5f391bb6e6f5461be (patch)
tree9a57a956fe3530040680bfa38ea1d8d149c80dcf
parentf75d39858877e4f21162f4bbdd06f143967a637f (diff)
downloadxineliboutput-8e29c296e75f84d851eda8c5f391bb6e6f5461be.tar.gz
xineliboutput-8e29c296e75f84d851eda8c5f391bb6e6f5461be.tar.bz2
Detect mpeg-ts radio streams (PMT has no video pid)
-rw-r--r--device.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/device.c b/device.c
index f73c4a3c..adce95c7 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c,v 1.115 2011-11-13 08:46:28 phintuka Exp $
+ * $Id: device.c,v 1.116 2011-11-13 08:49:34 phintuka Exp $
*
*/
@@ -1149,6 +1149,16 @@ int cXinelibDevice::PlayTs(const uchar *Data, int Length, bool VideoOnly)
LOGMSG("Lost PAT/PMT fragment !");
TsBufferFlush();
+
+ /* detect radio streams */
+ int patv, pmtv;
+ if (PatPmtParser()->GetVersions(patv, pmtv)) {
+ if (!PatPmtParser()->Vpid() && PatPmtParser()->Apid(0)) {
+ m_RadioStream = true;
+ m_AudioCount = 0;
+ ForEach(m_clients, &cXinelibThread::SetNoVideo, m_RadioStream);
+ }
+ }
}
}