oggdemux: do not try to determine duration of header packets

Headers are inherently durationless.
Instead, set duration to 0 to avoid increasing tracked granpos,
and do not warn about it, since it is totally expected.

https://bugzilla.gnome.org/show_bug.cgi?id=657151
This commit is contained in:
Vincent Penquerc'h 2011-08-23 10:32:36 +01:00 committed by Sebastian Dröge
parent 67a882afe7
commit 5d18496a5b

View file

@ -499,8 +499,13 @@ gst_ogg_demux_chain_peer (GstOggPad * pad, ogg_packet * packet,
}
/* get timing info for the packet */
duration = gst_ogg_stream_get_packet_duration (&pad->map, packet);
GST_DEBUG_OBJECT (ogg, "packet duration %" G_GUINT64_FORMAT, duration);
if (gst_ogg_stream_packet_is_header (&pad->map, packet)) {
duration = 0;
GST_DEBUG_OBJECT (ogg, "packet is header");
} else {
duration = gst_ogg_stream_get_packet_duration (&pad->map, packet);
GST_DEBUG_OBJECT (ogg, "packet duration %" G_GUINT64_FORMAT, duration);
}
if (packet->b_o_s) {
out_timestamp = GST_CLOCK_TIME_NONE;