From 6fd35381a879def5e76f99cded43a2a3c265c333 Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Tue, 10 Nov 2015 12:40:54 -0800 Subject: libhb: repair split packets in reader We split PES packets when there is a PCR change in the middle of the packet. This works fine for audio and video where the decoder parses the ES to find frame boundaries. But it does not work for some decoders such as PGS subtitles. So mark split buffers and reassemble them in reader after processing the PCR change. --- libhb/stream.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libhb/stream.c') diff --git a/libhb/stream.c b/libhb/stream.c index 3ddba0256..caa998a07 100644 --- a/libhb/stream.c +++ b/libhb/stream.c @@ -4537,6 +4537,10 @@ static hb_buffer_t * generate_output_data(hb_stream_t *stream, int curstream) // DTS-HD is an example of this. buf = hb_buffer_init(es_size); + if (ts_stream->packet_len < ts_stream->pes_info.packet_len + 6) + { + buf->s.split = 1; + } hb_buffer_list_append(&list, buf); buf->s.id = get_id(pes_stream); -- cgit v1.2.3