diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2009-04-26 12:19:00 +0200 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2009-04-26 12:19:00 +0200 |
commit | 733a2becc44a02daf10b97d24b8a9c8b00de3964 (patch) | |
tree | 18b2ce735f7932228d09e27570588fd86a94186c /device.c | |
parent | 1aadb31fb355550bb415ed971322a9bcb80f9325 (diff) | |
download | vdr-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 'device.c')
-rw-r--r-- | device.c | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 2.13 2009/04/05 12:15:41 kls Exp $ + * $Id: device.c 2.16 2009/04/18 09:41:00 kls Exp $ */ #include "device.h" @@ -1075,6 +1075,7 @@ bool cDevice::AttachPlayer(cPlayer *Player) Detach(player); DELETENULL(liveSubtitle); DELETENULL(dvbSubtitleConverter); + patPmtParser.Reset(); player = Player; if (!Transferring()) ClrAvailableTracks(false, true); @@ -1099,6 +1100,7 @@ void cDevice::Detach(cPlayer *Player) SetPlayMode(pmNone); SetVideoDisplayFormat(eVideoDisplayFormat(Setup.VideoDisplayFormat)); PlayTs(NULL, 0); + patPmtParser.Reset(); Audios.ClearAudio(); isPlayingVideo = false; } @@ -1317,14 +1319,24 @@ int cDevice::PlayTs(const uchar *Data, int Length, bool VideoOnly) { int Played = 0; if (Data == NULL) { - patPmtParser.Reset(); tsToPesVideo.Reset(); tsToPesAudio.Reset(); tsToPesSubtitle.Reset(); } + else if (Length < TS_SIZE) { + esyslog("ERROR: skipped %d bytes of TS fragment", Length); + return Length; + } else { cMutexLock MutexLock(&mutexCurrentAudioTrack); while (Length >= TS_SIZE) { + if (Data[0] != TS_SYNC_BYTE) { + int Skipped = 1; + while (Skipped < Length && (Data[Skipped] != TS_SYNC_BYTE || Length - Skipped > TS_SIZE && Data[Skipped + TS_SIZE] != TS_SYNC_BYTE)) + Skipped++; + esyslog("ERROR: skipped %d bytes to sync on start of TS packet", Skipped); + return Played + Skipped; + } if (TsHasPayload(Data)) { // silently ignore TS packets w/o payload int PayloadOffset = TsPayloadOffset(Data); if (PayloadOffset < TS_SIZE) { |