<pre>
<font size=4>
found out that if i use async in sending the eos through the pipeline it will work. making the filesink property async to FALSE.

<b>1.</b> unset flag so filesink will not send eos down the pipeline.
GST_OBJECT_FLAG_UNSET(filesink, GST_ELEMENT_FLAG_SINK);
<b>2.</b> gst_element_call_async([ELEMENT],(GstElementCallAsyncFunc)send_eos_async, [source pad], NULL);
<b>3.</b>
static void
send_eos_async(GstElement* element, gpointer user_data)
{
        GstEvent *eos;
        GstPad *pad;
        GstPad* srcPad = (GstPad*)user_data;
        eos = gst_event_new_eos();
        
        if (!pad)
                pad = gst_pad_get_peer(srcPad);
        
        gst_pad_send_event(pad, eos);

        gst_object_unref(pad);
}
<b>4.</b> gst_pad_add_probe(vteePad, GST_PAD_PROBE_TYPE_BLOCK,video_block_cb, pPipe, nullptr);
<b>5.</b> do {}while() to make sure block is finished
<b>6.</b> while() for seeing flag if eos got caught. within gst_pad_add_probe(sinkPad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM,RtspEventProbe, pPipe, nullptr);
<b>7.</b> Unlink record elements
<b>8.</b> link record elements again
<b>9.</b> set GST_STATE_PLAYING on record elements
<b>10.</b> unblock pads
</font>
</pre>

        
        
        <div class="signature" style="margin-top:1em;color:#666666;font-size:11px;">
                                ------------------------------
<br/>Gstreamer 1.14.3
<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/>