From 654ca28f1b23fbba22b121b56bc5df9db8d588dc Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Wed, 25 Mar 2009 21:24:44 +0100 Subject: [PATCH] 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 file changed, 7 insertions(+) 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); + } } } -- 2.7.4