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
This commit is contained in:
Vincent Penquerc'h 2015-03-16 11:53:24 +00:00
parent e6cb520036
commit 1ee2fccfdf

View file

@ -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, GST_INFO_OBJECT (pad, "Starting with first granule %" G_GINT64_FORMAT,
granule); granule);
} else { } 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 { } else {
GST_WARNING_OBJECT (pad, GST_WARNING_OBJECT (pad,