Commit 09e2072e authored by Andrew de Quincey's avatar Andrew de Quincey

Has misunderstood private_1 stream format. Fixed

parent bea2e23d
......@@ -2,7 +2,7 @@
* ps2ts.cpp: MPEG1 and MPEG2 PS to MPEG2 TS converter
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: ps2ts.cpp,v 1.10 2003/08/14 14:45:49 adq Exp $
* $Id: ps2ts.cpp,v 1.11 2003/08/20 13:49:49 adq Exp $
*
* Authors: Benoit Steiner <benny@via.ecp.fr>
* Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
......@@ -458,9 +458,9 @@ template <class Reader, class TsProvider>
if ((m_iDataType & 0xff) != PES_ID_PRIVATE_1) {
curDesc = m_cPgrmDescriptor.GetDescriptor(m_iDataType & 0xFF);
} else {
// Is an encapsulated MPEG1 stream.. special handling needed
// Is an encapsulated private stream.. special handling needed
// if we're at the start of a PES packet, read (and cache) the
// header and find the MPEG1 stream ID
// header and find the private stream ID
if (!m_bInMiddleOfPES) {
// read in the start of the PES header
if (iRc = ReadData(m_bCache, 3)) {
......@@ -474,15 +474,15 @@ template <class Reader, class TsProvider>
}
m_iCacheLen += m_bCache[2];
// read in the start of the MPEG1 header
u8* mpeg1Header = m_bCache + m_iCacheLen;
if (iRc = ReadData(m_bCache + m_iCacheLen, 4)) {
// read in the start of the ES header
u8* esHeader = m_bCache + m_iCacheLen;
if (iRc = ReadData(m_bCache + m_iCacheLen, 1)) {
return iRc;
}
m_iCacheLen += 4;
m_iCacheLen += 1;
// finally, grab the mpeg1 header stream id
m_iPrivateId = mpeg1Header[3];
// finally, grab the private id
m_iPrivateId = esHeader[0];
}
// get the descriptor taking into account the MPEG1 stream id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment