[gst-cvs] gst-plugins-bad: qtmux: fix reusing element
Mark Nauwelaerts
mnauw at kemper.freedesktop.org
Thu Mar 26 13:58:25 PDT 2009
Module: gst-plugins-bad
Branch: master
Commit: 654ca28f1b23fbba22b121b56bc5df9db8d588dc
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=654ca28f1b23fbba22b121b56bc5df9db8d588dc
Author: Mark Nauwelaerts <mark.nauwelaerts at collabora.co.uk>
Date: Wed Mar 25 21:24:44 2009 +0100
qtmux: fix reusing element
State change to READY and then back to PAUSED should still provide
the proper structures as are otherwise freshly available following
a request_new_pad.
Pointed out by Thiago Santos.
---
gst/qtmux/gstqtmux.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/gst/qtmux/gstqtmux.c b/gst/qtmux/gstqtmux.c
index 4b4344b..f3e85f5 100644
--- a/gst/qtmux/gstqtmux.c
+++ b/gst/qtmux/gstqtmux.c
@@ -293,6 +293,13 @@ gst_qt_mux_reset (GstQTMux * qtmux, gboolean alloc)
if (alloc) {
qtmux->moov = atom_moov_new (qtmux->context);
+ /* ensure all is as nice and fresh as request_new_pad would provide it */
+ for (walk = qtmux->collect->data; walk; walk = g_slist_next (walk)) {
+ GstQTPad *qtpad = (GstQTPad *) walk->data;
+
+ qtpad->trak = atom_trak_new (qtmux->context);
+ atom_moov_add_trak (qtmux->moov, qtpad->trak);
+ }
}
}
More information about the Gstreamer-commits
mailing list