summaryrefslogtreecommitdiffstats
path: root/gst/qtmux/gstqtmux.c
diff options
context:
space:
mode:
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2009-03-25 21:24:44 +0100
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2009-03-26 21:56:28 +0100
commit654ca28f1b23fbba22b121b56bc5df9db8d588dc (patch)
treeff9eb03fcf71d8c3c2b5ed3c5849da648d7f2042 /gst/qtmux/gstqtmux.c
parentf510be57cd96c2814ee319bbd9c562709f1e49ba (diff)
downloadgst-plugins-bad-654ca28f1b23fbba22b121b56bc5df9db8d588dc.tar.gz
gst-plugins-bad-654ca28f1b23fbba22b121b56bc5df9db8d588dc.tar.bz2
gst-plugins-bad-654ca28f1b23fbba22b121b56bc5df9db8d588dc.zip
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.
Diffstat (limited to 'gst/qtmux/gstqtmux.c')
-rw-r--r--gst/qtmux/gstqtmux.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gst/qtmux/gstqtmux.c b/gst/qtmux/gstqtmux.c
index 4b4344b0..f3e85f5c 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);
+ }
}
}