summaryrefslogtreecommitdiffstats
path: root/libhb/stream.c
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2015-11-10 12:40:54 -0800
committerJohn Stebbins <[email protected]>2015-11-10 12:40:54 -0800
commit6fd35381a879def5e76f99cded43a2a3c265c333 (patch)
tree55c62a71ff3bdf65ed5e3ff95af2be9995a3627a /libhb/stream.c
parent598a40fc53002a9f5adeba8fc45e4f7a42df2e25 (diff)
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.
Diffstat (limited to 'libhb/stream.c')
-rw-r--r--libhb/stream.c4
1 files changed, 4 insertions, 0 deletions
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);