qtdemux: Do allocation query after exposing all pads and no-more-pads

Also configure video streams as early as possible.

Related https://bugzilla.gnome.org/show_bug.cgi?id=701856
but not fixing that.
This commit is contained in:
Sebastian Dröge 2013-06-11 12:26:24 +02:00
parent ab275b62a8
commit adc9f0bd10

View file

@ -5672,6 +5672,7 @@ gst_qtdemux_add_stream (GstQTDemux * qtdemux,
stream->pad = stream->pad =
gst_pad_new_from_static_template (&gst_qtdemux_videosrc_template, name); gst_pad_new_from_static_template (&gst_qtdemux_videosrc_template, name);
g_free (name); g_free (name);
gst_qtdemux_configure_stream (qtdemux, stream);
qtdemux->n_video_streams++; qtdemux->n_video_streams++;
} else { } else {
GST_DEBUG_OBJECT (qtdemux, "unknown stream type"); GST_DEBUG_OBJECT (qtdemux, "unknown stream type");
@ -5688,8 +5689,6 @@ gst_qtdemux_add_stream (GstQTDemux * qtdemux,
stream->pending_tags = list; stream->pending_tags = list;
/* global tags go on each pad anyway */ /* global tags go on each pad anyway */
stream->send_global_tags = TRUE; stream->send_global_tags = TRUE;
qtdemux_do_allocation (qtdemux, stream);
} }
done: done:
return TRUE; return TRUE;
@ -8345,6 +8344,12 @@ qtdemux_expose_streams (GstQTDemux * qtdemux)
qtdemux->posted_redirect = TRUE; qtdemux->posted_redirect = TRUE;
} }
for (i = 0; i < qtdemux->n_streams; i++) {
QtDemuxStream *stream = qtdemux->streams[i];
qtdemux_do_allocation (qtdemux, stream);
}
qtdemux->exposed = TRUE; qtdemux->exposed = TRUE;
return ret; return ret;
} }