Commit 2ac5bd29 authored by Vincent Penquerc'h's avatar Vincent Penquerc'h
Browse files

oggdemux: fix audio glitches with low bitrate vorbis

A low bitrate stream which can pack more than 2 seconds of audio
in a page would cause the stream's position to be updated not
often enough, and would trigger a spurious "jump" via a GAP
event. Instead, we update the stream position after calculating
the new overall segment position.

https://bugzilla.gnome.org/show_bug.cgi?id=764966
parent 27e7ca33
...@@ -808,8 +808,6 @@ gst_ogg_demux_chain_peer (GstOggPad * pad, ogg_packet * packet, ...@@ -808,8 +808,6 @@ gst_ogg_demux_chain_peer (GstOggPad * pad, ogg_packet * packet,
pad->discont = FALSE; pad->discont = FALSE;
} }
pad->position = ogg->segment.position;
/* don't push the header packets when we are asked to skip them */ /* don't push the header packets when we are asked to skip them */
if (!packet->b_o_s || push_headers) { if (!packet->b_o_s || push_headers) {
if (pad->last_ret == GST_FLOW_OK) { if (pad->last_ret == GST_FLOW_OK) {
...@@ -854,6 +852,8 @@ gst_ogg_demux_chain_peer (GstOggPad * pad, ogg_packet * packet, ...@@ -854,6 +852,8 @@ gst_ogg_demux_chain_peer (GstOggPad * pad, ogg_packet * packet,
GST_DEBUG_OBJECT (ogg, "ogg current time %" GST_TIME_FORMAT GST_DEBUG_OBJECT (ogg, "ogg current time %" GST_TIME_FORMAT
" (%" G_GINT64_FORMAT ")", GST_TIME_ARGS (current_time), current_time); " (%" G_GINT64_FORMAT ")", GST_TIME_ARGS (current_time), current_time);
pad->position = ogg->segment.position;
/* check stream eos */ /* check stream eos */
if (!pad->is_eos && !delta_unit && if (!pad->is_eos && !delta_unit &&
((ogg->segment.rate > 0.0 && ((ogg->segment.rate > 0.0 &&
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment