From 46aff49316cfaf2ec44dc5e1fde780fbfc857823 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Fri, 10 May 2013 09:28:52 +0200 Subject: [PATCH] oggmux: don't send a segment event before the caps event https://bugzilla.gnome.org/show_bug.cgi?id=699971 --- ext/ogg/gstoggmux.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ext/ogg/gstoggmux.c b/ext/ogg/gstoggmux.c index 7e12a61b52..f4c914ad9a 100644 --- a/ext/ogg/gstoggmux.c +++ b/ext/ogg/gstoggmux.c @@ -1544,8 +1544,12 @@ gst_ogg_mux_send_headers (GstOggMux * mux) if (!gst_caps_is_fixed (caps)) caps = gst_caps_fixate (caps); if (caps) { + GstSegment segment; + caps = gst_ogg_mux_set_header_on_caps (caps, hbufs); gst_pad_set_caps (mux->srcpad, caps); + gst_segment_init (&segment, GST_FORMAT_TIME); + gst_pad_push_event (mux->srcpad, gst_event_new_segment (&segment)); gst_caps_unref (caps); } } @@ -1931,17 +1935,12 @@ all_pads_eos (GstCollectPads * pads) static void gst_ogg_mux_send_start_events (GstOggMux * ogg_mux, GstCollectPads * pads) { - GstSegment segment; gchar s_id[32]; /* stream-start (FIXME: create id based on input ids) */ g_snprintf (s_id, sizeof (s_id), "oggmux-%08x", g_random_int ()); gst_pad_push_event (ogg_mux->srcpad, gst_event_new_stream_start (s_id)); - /* segment */ - gst_segment_init (&segment, GST_FORMAT_BYTES); - gst_pad_push_event (ogg_mux->srcpad, gst_event_new_segment (&segment)); - /* we'll send caps later, need to collect all headers first */ }