[Bug 744806] audiodecoder: early call to drain() causes segment event to be sent before caps

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Feb 19 09:52:33 PST 2015


https://bugzilla.gnome.org/show_bug.cgi?id=744806

Tim-Philipp Müller <t.i.m at zen.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |t.i.m at zen.co.uk,
                   |                            |thaytan at noraisin.net

--- Comment #2 from Tim-Philipp Müller <t.i.m at zen.co.uk> ---
Which was:

commit 7c0f885ad246efd18b21c35a9c7f3200828a652c
Author: Jan Schmidt <jan at centricular.com>
Date:   Sat Jan 31 05:09:46 2015 +1100

    audiodecoder: Fix reverse playback when there's only one gather set.

    The decoder can fail to drain on EOS if there was only one gather
    set, because it will never have sent the segment event downstream
    and set the output segment, and fail to detect that the rate < 0.0

    Make sure to send pending events before sending all the gather data
    for decode.

diff --git a/gst-libs/gst/audio/gstaudiodecoder.c
b/gst-libs/gst/audio/gstaudiodecoder.c
index 2ba58aa..0b768b1 100644
--- a/gst-libs/gst/audio/gstaudiodecoder.c
+++ b/gst-libs/gst/audio/gstaudiodecoder.c
@@ -1444,6 +1444,9 @@ gst_audio_decoder_drain (GstAudioDecoder * dec)
   if (dec->priv->drained && !dec->priv->gather)
     return GST_FLOW_OK;
   else {
+    /* Send any pending events before draining, as that
+     * may update the pending segment info */
+    send_pending_events (dec);
     /* dispatch reverse pending buffers */
     /* chain eventually calls upon drain as well, but by that time
      * gather list should be clear, so ok ... */

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list