summaryrefslogtreecommitdiffstats
path: root/libhb/demuxmpeg.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-04-08 20:32:32 +0000
committerjstebbins <[email protected]>2011-04-08 20:32:32 +0000
commit40d04d0ffe6a58d07bb0e46c1fd6060edbb6e80b (patch)
tree76c32eae70f16e66c7f4e3dc726c845843927108 /libhb/demuxmpeg.c
parent5f692a69a63f106cabe9dad4dfc85cc5c6d93cb9 (diff)
Handle boundaries between blueray clips better.
These boundaries are always discontinuities. But sometimes we were not detecting them as such and would drop frames. So set a flag in the buffer when libbluray tells us a new clip is starting and use that to trigger computation of a new scr offset. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3912 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/demuxmpeg.c')
-rw-r--r--libhb/demuxmpeg.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libhb/demuxmpeg.c b/libhb/demuxmpeg.c
index 4185cb503..763f3e31a 100644
--- a/libhb/demuxmpeg.c
+++ b/libhb/demuxmpeg.c
@@ -218,6 +218,14 @@ int hb_demux_ts( hb_buffer_t *buf_ps, hb_list_t *list_es, hb_psdemux_t *state )
{
if ( state )
{
+ if ( buf_ps->discontinuity )
+ {
+ // Buffer has been flagged as a discontinuity. This happens
+ // when a blueray changes clips.
+ ++state->scr_changes;
+ state->last_scr = buf_ps->start;
+ }
+
// we're keeping track of timing (i.e., not in scan)
// check if there's a new pcr in this packet
if ( buf_ps->stop >= 0 )