From 7e6125fc8f1d077a13b874a4bf615e5ccde9eb19 Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Thu, 6 Jan 2011 18:29:06 +0000 Subject: [PATCH] mpegstream: increase allowable gap between streams The new delay is three times as much as the old one, and just happens to let me properly decode my "Princess Mononoke" DVD, on which dvdreadsrc was chocking before at 5:11. While there, merge the constants used in two places into a define. https://bugzilla.gnome.org/show_bug.cgi?id=539708 --- gst/mpegstream/gstdvddemux.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gst/mpegstream/gstdvddemux.c b/gst/mpegstream/gstdvddemux.c index 8faadea..4c53fbf 100644 --- a/gst/mpegstream/gstdvddemux.c +++ b/gst/mpegstream/gstdvddemux.c @@ -32,6 +32,8 @@ */ #define PTM_DISCONT_ADJUST (0.3 * GST_SECOND) #define INITIAL_END_PTM (-1) +#define MAX_GAP ( 3 * GST_SECOND / 2 ) +#define MAX_GAP_TOLERANCE ( GST_SECOND / 20 ) GST_DEBUG_CATEGORY_STATIC (gstdvddemux_debug); #define GST_CAT_DEFAULT (gstdvddemux_debug) @@ -439,8 +441,8 @@ gst_dvd_demux_handle_dvd_event (GstDVDDemux * dvd_demux, GstEvent * event) gst_element_no_more_pads (GST_ELEMENT (dvd_demux)); /* Keep video/audio/subtitle pads within 1/2 sec of the SCR */ - mpeg_demux->max_gap = GST_SECOND / 2; - mpeg_demux->max_gap_tolerance = GST_SECOND / 20; + mpeg_demux->max_gap = MAX_GAP; + mpeg_demux->max_gap_tolerance = MAX_GAP_TOLERANCE; } else { GST_DEBUG_OBJECT (dvd_demux, "dvddemux Forwarding DVD event %s to all pads", event_type); @@ -1179,8 +1181,8 @@ gst_dvd_demux_reset (GstDVDDemux * dvd_demux) dvd_demux->mpeg_version = 0; /* Reset max_gap handling */ - mpeg_demux->max_gap = 0.5 * GST_SECOND; - mpeg_demux->max_gap_tolerance = 0.05 * GST_SECOND; + mpeg_demux->max_gap = MAX_GAP; + mpeg_demux->max_gap_tolerance = MAX_GAP_TOLERANCE; } static void -- 2.7.4