+2008-05-13 Sebastian Dröge <slomo@circular-chaos.org>
+
+ Patch by: j^ <j at oil21 dot org>
+
+ * ext/ogg/gstoggdemux.c: (gst_ogg_pad_parse_skeleton_fishead),
+ (gst_ogg_pad_parse_skeleton_fisbone):
+ * ext/ogg/gstoggdemux.h:
+ Parse presentation time from skeleton streams and use it as offset
+ for the timestamps. Fixes bug #530068.
+
2008-05-12 Wim Taymans <wim.taymans@collabora.co.uk>
* gst-libs/gst/audio/gstbaseaudiosink.c:
data += 8;
ogg->basetime = gst_util_uint64_scale (GST_SECOND, basetime_n, basetime_d);
+ ogg->prestime = gst_util_uint64_scale (GST_SECOND, prestime_n, prestime_d);
ogg->have_fishead = TRUE;
pad->is_skeleton = TRUE;
pad->start_time = GST_CLOCK_TIME_NONE;
pad->first_granule = -1;
pad->first_time = GST_CLOCK_TIME_NONE;
GST_INFO_OBJECT (ogg, "skeleton fishead parsed (basetime: %"
- GST_TIME_FORMAT ")", GST_TIME_ARGS (ogg->basetime));
+ GST_TIME_FORMAT ", prestime: %" GST_TIME_FORMAT ")",
+ GST_TIME_ARGS (ogg->basetime), GST_TIME_ARGS (ogg->prestime));
}
/* function called when a skeleton fisbone is found. Caller ensures that
static void
gst_ogg_pad_parse_skeleton_fisbone (GstOggPad * pad, ogg_packet * packet)
{
+ GstOggDemux *ogg = pad->ogg;
GstOggPad *fisbone_pad;
gint64 start_granule;
guint32 serialno;
/* padding */
data += 3;
- fisbone_pad->start_time = gst_annodex_granule_to_time (start_granule,
+ fisbone_pad->start_time = ogg->prestime - ogg->basetime;
+ fisbone_pad->start_time += gst_annodex_granule_to_time (start_granule,
fisbone_pad->granulerate_n, fisbone_pad->granulerate_d,
fisbone_pad->granuleshift);