From: Mark Nauwelaerts Date: Wed, 25 Mar 2009 20:24:44 +0000 (+0100) Subject: qtmux: fix reusing element X-Git-Tag: RELEASE-0.10.29~214 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4da6cd7c36b1b4fa0fe12ef76f9c2f2e67bb4816;p=platform%2Fupstream%2Fgst-plugins-good.git 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. --- diff --git a/gst/quicktime/gstqtmux.c b/gst/quicktime/gstqtmux.c index 4b4344b01..f3e85f5ce 100644 --- a/gst/quicktime/gstqtmux.c +++ b/gst/quicktime/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); + } } }