summaryrefslogtreecommitdiffstats
path: root/libhb/stream.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2014-05-13 10:27:36 +0000
committerjstebbins <[email protected]>2014-05-13 10:27:36 +0000
commit4f26df992773986e3134907aabca1efe216c7a59 (patch)
tree6973bd56e6519c7a5836c156bfec2910c356a7f6 /libhb/stream.c
parentfbef8a53808d5927abb8bdb1a99fac82d9901505 (diff)
demux: fix problem with widely spaced SCRs
Fixes this bug report https://forum.handbrake.fr/viewtopic.php?f=12&t=30032 Split MPEG demuxer into TS demuxer and PS demuxer to allow using different PCR/SCR delta tolerance in each scenario. We were using a PCR/SCR delta tolerance that was a bit of a compromise between the max allowed by the specification for TS vs PS streams. But the spec for TS PCR is 100ms and the spec for PS SCR is 700ms, so we risked false detection of discontinuities in PS. In PS streams that pack multiple frames into one PES packet, the detection of a discontinuity causes recalculation of an scr offset which jumps around wildly. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6183 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/stream.c')
-rw-r--r--libhb/stream.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libhb/stream.c b/libhb/stream.c
index b133dda78..7f411a297 100644
--- a/libhb/stream.c
+++ b/libhb/stream.c
@@ -1070,14 +1070,18 @@ hb_title_t * hb_stream_title_scan(hb_stream_t *stream, hb_title_t * title)
title->video_id = get_id( &stream->pes.list[idx] );
title->video_codec = stream->pes.list[idx].codec;
title->video_codec_param = stream->pes.list[idx].codec_param;
- title->demuxer = HB_MPEG_DEMUXER;
if (stream->hb_stream_type == transport)
{
+ title->demuxer = HB_TS_DEMUXER;
// make sure we're grabbing the PCR PID
update_ts_streams( stream, stream->pmt_info.PCR_PID, 0, -1, P, NULL );
}
+ else
+ {
+ title->demuxer = HB_PS_DEMUXER;
+ }
// IDRs will be search for in hb_stream_duration
stream->has_IDRs = 0;