summaryrefslogtreecommitdiff
path: root/remux.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2009-04-26 12:19:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2009-04-26 12:19:00 +0200
commit733a2becc44a02daf10b97d24b8a9c8b00de3964 (patch)
tree18b2ce735f7932228d09e27570588fd86a94186c /remux.c
parent1aadb31fb355550bb415ed971322a9bcb80f9325 (diff)
downloadvdr-patch-lnbsharing-733a2becc44a02daf10b97d24b8a9c8b00de3964.tar.gz
vdr-patch-lnbsharing-733a2becc44a02daf10b97d24b8a9c8b00de3964.tar.bz2
Version 1.7.6vdr-1.7.6
- cDevice::PlayTs() now syncs on the TS packet sync bytes. - Made MAXFRAMESIZE a multiple of TS_SIZE to avoid breaking up TS packets. - No longer resetting the patPmtParser in cDevice::PlayTs(), because this caused the selected audio and subtitle tracks to fall back to the default. - The SVDRP command PUTE now supports reading the EPG data from a given file (thanks to Helmut Auer). - Added cThread::SetIOPriority() and using it in cRemoveDeletedRecordingsThread (thanks to Rolf Ahrenberg). - Fixed the MEGABYTE() macro to make it correctly handle parameters resulting in values larger than 2GB. - Added cDevice::NumProvidedSystems() to PLUGINS.html (was missing since it had been implemented). - Fixed distortions when switching to the next file during replay. - Fixed detecting the frame rate for streams with PTS distances of 1800, which apparently split one frame over two payload units. - Added missing 'const' to cRecording::FramesPerSecond() (thanks to Joachim Wilke). - Any TS packets in the first "frame" after a cut in an edited recording that don't belong to a payload unit that started in that frame now get their TEI flag set, so that a decoder will ignore them together with any PES data collected for that PID so far (thanks to Oliver Endriss for reporting chirping sound disturbences at editing points in TS recordings). - cDvbPlayer::Empty() subtracts 1 from readIndex, because Action() will first increment it. - Only storing non-zero Pts values in ptsIndex. - Added a note to the INSTALL file about using subdirectories to split a large disk into separate areas for VDR's video data and other stuff (suggested by Udo Richter).
Diffstat (limited to 'remux.c')
-rw-r--r--remux.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/remux.c b/remux.c
index 89fe85d..10e5145 100644
--- a/remux.c
+++ b/remux.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: remux.c 2.17 2009/04/05 14:07:48 kls Exp $
+ * $Id: remux.c 2.19 2009/04/19 10:59:56 kls Exp $
*/
#include "remux.h"
@@ -124,6 +124,24 @@ int64_t TsGetPts(const uchar *p, int l)
return -1;
}
+void TsSetTeiOnBrokenPackets(uchar *p, int l)
+{
+ bool Processed[MAXPID] = { false };
+ while (l >= TS_SIZE) {
+ if (*p != TS_SYNC_BYTE)
+ break;
+ int Pid = TsPid(p);
+ if (!Processed[Pid]) {
+ if (!TsPayloadStart(p))
+ p[1] |= TS_ERROR;
+ else
+ Processed[Pid] = true;
+ }
+ l -= TS_SIZE;
+ p += TS_SIZE;
+ }
+}
+
// --- cPatPmtGenerator ------------------------------------------------------
cPatPmtGenerator::cPatPmtGenerator(cChannel *Channel)
@@ -582,6 +600,10 @@ cTsToPes::~cTsToPes()
void cTsToPes::PutTs(const uchar *Data, int Length)
{
+ if (TsError(Data)) {
+ Reset();
+ return; // ignore packets with TEI set, and drop any PES data collected so far
+ }
if (TsPayloadStart(Data))
Reset();
else if (!size)
@@ -732,6 +754,10 @@ int cFrameDetector::Analyze(const uchar *Data, int Length)
frameDuration = 3600; // PAL, 25 fps
else if (Delta % 3003 == 0)
frameDuration = 3003; // NTSC, 29.97 fps
+ else if (Delta == 1800) {
+ frameDuration = 3600; // PAL, 25 fps
+ framesPerPayloadUnit = -2;
+ }
else if (Delta == 1501) {
frameDuration = 3003; // NTSC, 29.97 fps
framesPerPayloadUnit = -2;