From 1ee2fccfdf85c73efd6a8aeafa8336ec5301c19d Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Mon, 16 Mar 2015 11:53:24 +0000 Subject: [PATCH] oggdemux: fix playback regression on streams with clipped data at start The code that was calculating the start granule from packet durations was interpreting a negative value as an error, but this is actually a valid case, to indicate clipping of data at start. https://bugzilla.gnome.org/show_bug.cgi?id=743900 --- ext/ogg/gstoggdemux.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index 7e55d05..86615bf 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -1261,7 +1261,9 @@ gst_ogg_demux_setup_first_granule (GstOggDemux * ogg, GstOggPad * pad, GST_INFO_OBJECT (pad, "Starting with first granule %" G_GINT64_FORMAT, granule); } else { - GST_WARNING_OBJECT (pad, "Extrapolated first granule is negative"); + pad->current_granule = 0; + GST_INFO_OBJECT (pad, "Extrapolated first granule is negative, " + "used to clip samples at start"); } } else { GST_WARNING_OBJECT (pad, -- 2.7.4