<p>I even tried another approach but found out that when I go to delete array or g_free it will error out.</p><br/>
<br/>
gchar* videoPipeline::NextFile_splitmux_cb(GstElement* element, guint fragment_id,gpointer user_data)<br/>
{<br/>
                printf("\r\nSetup new File\r\n");<br/>
                std::string filePath = "";<br/>
                std::string temp = "video05%d.avi";<br/>
                gchar* name;            <br/>
                name = g_strdup_printf(g_strdup_printf("%s", temp.c_str()), fragment_id);<br/>
<br/>
                filePath = std::string(name);<br/>
                g_free(name);<br/>
                return g_strdup_printf("%s", filePath);<br/>
}

        
        
        <div class="signature" style="margin-top:1em;color:#666666;font-size:11px;">
                                ------------------------------
<br/>Gstreamer 1.14.1
<br/>------------------------------
<br/>Windows
                        </div>
<br/><hr align="left" width="300" />
Sent from the <a href="http://gstreamer-devel.966125.n4.nabble.com/">GStreamer-devel mailing list archive</a> at Nabble.com.<br/>