summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Duponchelle <mathieu.duponchelle@epitech.eu>2013-05-10 09:28:52 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2013-05-10 09:28:52 +0200
commit46aff49316cfaf2ec44dc5e1fde780fbfc857823 (patch)
tree7b04ec62afbf3f8658add8eca2ecd959eb85554c
parent6f233f67efa338a52a4f5c439f3c47ebc9431b4c (diff)
oggmux: don't send a segment event before the caps event
https://bugzilla.gnome.org/show_bug.cgi?id=699971
-rw-r--r--ext/ogg/gstoggmux.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/ext/ogg/gstoggmux.c b/ext/ogg/gstoggmux.c
index 7e12a61b5..f4c914ad9 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 */
}