diff options
author | van <[email protected]> | 2008-10-03 05:10:21 +0000 |
---|---|---|
committer | van <[email protected]> | 2008-10-03 05:10:21 +0000 |
commit | d788a4e391e103413ac92e7513bf6d0e13e11a65 (patch) | |
tree | 1f3405713226bde9afafde48275d48ee3eb13d05 /libhb/demuxmpeg.c | |
parent | ccf8c8ce045d6e48194315dc4a42dc0d1a3b515c (diff) |
- Only do 'lost PCR' checks (r1712) when we're dealing with something that could be an over-the-air transport stream. We can't lose the clock of a program stream and shouldn't have losses on an m2ts stream.
- Widen the DTS-to-PCR acceptance window from +-5sec to +-5min since there's nothing in the standard that bounds the offset between a DTS and its clock reference.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1802 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/demuxmpeg.c')
-rw-r--r-- | libhb/demuxmpeg.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libhb/demuxmpeg.c b/libhb/demuxmpeg.c index d92798a40..a30a15c59 100644 --- a/libhb/demuxmpeg.c +++ b/libhb/demuxmpeg.c @@ -137,7 +137,7 @@ int hb_demux_ps( hb_buffer_t * buf_ps, hb_list_t * list_es, hb_psdemux_t* state { dts = pts; } - if ( state ) + if ( state && state->flaky_clock ) { // Program streams have an SCR in every PACK header so they // can't lose their clock reference. But the PCR in Transport @@ -149,9 +149,10 @@ int hb_demux_ps( hb_buffer_t * buf_ps, hb_list_t * list_es, hb_psdemux_t* state // timestamps against the current reference clock and discarding // packets where the DTS is "too far" from its clock. int64_t fdelta = dts - state->last_scr; - if ( fdelta < -5000 * 90 || fdelta > 5000 * 90 ) + if ( fdelta < -300 * 90000LL || fdelta > 300 * 90000LL ) { // packet too far behind or ahead of its clock reference + ++state->dts_drops; pos = pes_packet_end; continue; } |