oggmux: pick delta pad earlier during header parsing and based on video/non-video
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 10 Aug 2012 09:45:09 +0000 (10:45 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 10 Aug 2012 09:45:09 +0000 (10:45 +0100)
Pick delta pad earlier during header parsing, and pick it based
on whether it's a video stream or not rather than some rather
byzantine signalling from theoraenc etc. which would set the delta
flag on header packets which oggmux would then pick up and determine
that this is a "delta-able" stream.

Since the new videodecoder-based theoraenc didn't do that any more,
we would only see the first delta flag on the second video packet,
which is after we've already muxed a few audio packets flagged as
key units, which trips up the unit test.

Fixes pipelines/oggmux unit test.

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

ext/ogg/gstoggmux.c

index ae6dc27..4d60af3 100644 (file)
@@ -991,6 +991,11 @@ gst_ogg_mux_queue_pads (GstOggMux * ogg_mux, gboolean * popped)
                 gst_collect_pads_set_waiting (ogg_mux->collect,
                     (GstCollectData *) pad, FALSE);
               }
+
+              if (pad->map.is_video && ogg_mux->delta_pad == NULL) {
+                ogg_mux->delta_pad = pad;
+                GST_INFO_OBJECT (pad, "selected delta pad");
+              }
             }
             if (caps)
               gst_caps_unref (caps);