Skip to content

Commit feb2a61

Browse files
authored
fix(ts): Skip broken PES packets instead of terminating file processing
2 parents 6503502 + 3e9ed30 commit feb2a61

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/lib_ccx/ts_functions.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,8 +589,11 @@ int copy_capbuf_demux_data(struct ccx_demuxer *ctx, struct demuxer_data **data,
589589
}
590590
if (vpesdatalen < 0)
591591
{
592-
dbg_print(CCX_DMT_VERBOSE, "Seems to be a broken PES. Terminating file handling.\n");
593-
return CCX_EOF;
592+
// Don't terminate file processing for a single broken PES packet.
593+
// Just skip this packet and continue with the next one.
594+
// This commonly occurs in UK Freeview DVB recordings.
595+
dbg_print(CCX_DMT_VERBOSE, "Skipping broken PES packet (buffer too small or malformed header).\n");
596+
return CCX_OK;
594597
}
595598

596599
if (ccx_options.hauppauge_mode)

0 commit comments

Comments
 (0)