TS packets with errors are now skipped when parsing for frames

This commit is contained in:
Klaus Schmidinger 2024-12-05 10:33:31 +01:00
parent 7a1842cba6
commit d169f30e5c
2 changed files with 5 additions and 2 deletions

View File

@ -10034,7 +10034,7 @@ Video Disk Recorder Revision History
(suggested by Stefan Hofmann). (suggested by Stefan Hofmann).
- Added vdrrootdir and incdir to vdr.pc (thanks to Stefan Hofmann). - Added vdrrootdir and incdir to vdr.pc (thanks to Stefan Hofmann).
2024-12-02: 2024-12-05:
- Removed all DEPRECATED_* code. - Removed all DEPRECATED_* code.
- Fixed error checking in case the fps value can't be determined by the frame parser. - Fixed error checking in case the fps value can't be determined by the frame parser.
@ -10043,3 +10043,4 @@ Video Disk Recorder Revision History
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg). - Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
- Fixed some typos in the translation files (thanks to Stefan Hofmann). - Fixed some typos in the translation files (thanks to Stefan Hofmann).
- Added some missing locking. - Added some missing locking.
- TS packets with errors are now skipped when parsing for frames.

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: remux.c 5.16 2024/12/04 14:33:10 kls Exp $ * $Id: remux.c 5.17 2024/12/05 10:33:31 kls Exp $
*/ */
#include "remux.h" #include "remux.h"
@ -287,6 +287,8 @@ uchar cTsPayload::GetByte(void)
if (TsPid(p) == pid) { // only handle TS packets for the initial PID if (TsPid(p) == pid) { // only handle TS packets for the initial PID
if (++numPacketsPid > MAX_TS_PACKETS_FOR_VIDEO_FRAME_DETECTION) if (++numPacketsPid > MAX_TS_PACKETS_FOR_VIDEO_FRAME_DETECTION)
return SetEof(); return SetEof();
if (TsError(p))
return SetEof(); // don't parse TS packets with errors
if (TsHasPayload(p)) { if (TsHasPayload(p)) {
if (index > 0 && TsPayloadStart(p)) // checking index to not skip the very first TS packet if (index > 0 && TsPayloadStart(p)) // checking index to not skip the very first TS packet
return SetEof(); return SetEof();