Commit 5f141f6a authored by Andrew de Quincey's avatar Andrew de Quincey

Fixed looping for PS streams to be as it should (i.e. a counter counting down)

Apologies for my slight confusion
parent 8deaf4c0
......@@ -2,7 +2,7 @@
* filereader.cpp: file reader
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: filereader.cpp,v 1.12 2003/08/20 14:45:47 adq Exp $
* $Id: filereader.cpp,v 1.13 2003/08/20 21:26:56 adq Exp $
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
*
......@@ -79,9 +79,6 @@ C_FileMpegReader::C_FileMpegReader(C_Module* pModule,
C_MpegReader(pModule, pBroadcast),
m_cFile(pBroadcast->GetOption("filename"))
{
m_iLoop = pBroadcast->GetOption("loop").ToInt();
if(m_iLoop) m_iLoop--;
if(pBroadcast->GetOption("end") == "1")
m_bEnd = true;
else
......
......@@ -2,7 +2,7 @@
* filereader.h: file reader
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: filereader.h,v 1.8 2003/08/13 23:04:21 adq Exp $
* $Id: filereader.h,v 1.9 2003/08/20 21:26:56 adq Exp $
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
*
......@@ -54,7 +54,6 @@ public:
protected:
C_File m_cFile;
s32 m_iLoop;
bool m_bEnd;
};
......
......@@ -2,7 +2,7 @@
* ps2ts.cpp: MPEG1 and MPEG2 PS to MPEG2 TS converter
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: ps2ts.cpp,v 1.12 2003/08/20 21:06:06 adq Exp $
* $Id: ps2ts.cpp,v 1.13 2003/08/20 21:26:56 adq Exp $
*
* Authors: Benoit Steiner <benny@via.ecp.fr>
* Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
......@@ -53,7 +53,7 @@ template <class Reader, class TsProvider>
C_Ps2Ts<Reader, TsProvider>::C_Ps2Ts(Reader* pReader, TsProvider* pTsProvider,
unsigned int iMaxBufferedTs,
unsigned int iMpegVersion,
bool bLooping,
int iLoop,
handle hLog) :
m_cPgrmDescriptor(iMpegVersion),
m_cPat(0, 0, 0), m_cPmt(0, 0, 0, 0, 0x50),
......@@ -78,7 +78,7 @@ C_Ps2Ts<Reader, TsProvider>::C_Ps2Ts(Reader* pReader, TsProvider* pTsProvider,
m_bNeedToSendPCR = true;
m_iNextPCR = 0;
m_iPrevPCR = 0;
m_bLooping = bLooping;
m_iLoop = iLoop;
m_bInMiddleOfPES = false;
m_bJustSynched = false;
m_hLog = hLog;
......@@ -251,7 +251,7 @@ template <class Reader, class TsProvider>
break;
case END_OF_STREAM:
if (m_bLooping) {
if (m_iLoop) {
// try and reset the stream
m_pReader->ResetEndOfStream();
......@@ -266,6 +266,7 @@ template <class Reader, class TsProvider>
m_bSendPSI = true;
m_bGenPat = true;
m_bGenPmt = true;
m_iLoop--;
}
break;
}
......
......@@ -2,7 +2,7 @@
* ps2ts.h: MPEG1 and MPEG2 PS to TS converter
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: ps2ts.h,v 1.6 2003/08/14 14:45:49 adq Exp $
* $Id: ps2ts.h,v 1.7 2003/08/20 21:26:56 adq Exp $
*
* Authors: Benoit Steiner <benny@via.ecp.fr>
* Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
......@@ -37,7 +37,7 @@ template <class Reader, class TsProvider> class C_Ps2Ts
{
public:
C_Ps2Ts(Reader* pReader, TsProvider* pTsProvider, unsigned int iMaxBufferedTs,
unsigned int iMpegVersion, bool bLooping, handle hLog);
unsigned int iMpegVersion, int iLoop, handle hLog);
~C_Ps2Ts();
// Find the first pack header in the stream
......@@ -99,7 +99,7 @@ template <class Reader, class TsProvider> class C_Ps2Ts
int m_iStatus;
u64 m_iNextPCR;
bool m_bNeedToSendPCR;
bool m_bLooping;
int m_iLoop;
u8 m_bCache[512];
int m_iCacheLen;
......
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