Launching the test in first and second way, with GST_DEBUG:ffmpeg:5<br><br>I can see that with &quot;./test 1 rec.asf&quot; then &quot;gst_ffmpegenc_flush_buffers&quot; is called woth param TRUE whereas in the second way the parameter is FALSE.<br>
<br>So I think the last buffer, which contains index informations maybe, is not sent to the muxer and so not written into the result file.<br><br>Why a such distinction in &quot;gst_ffmpegenc_flush_buffers&quot; (param send 0/1)&nbsp; ?<br>
<br>Sincerely<br><br>Julien<br><br><div class="gmail_quote">2008/11/25 Julien Isorce <span dir="ltr">&lt;<a href="mailto:julien.isorce@gmail.com">julien.isorce@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi<br><br>I join to this mail a simple test.<br><br>The test demonstrates that when the pipeline is stopped when sending eos from the client code, then ffmux_asf does not write the index, so it&#39;s not possible to seek when playing back the result file.<br>

If I set num_buffers=N instead of sending eos, then the muxer write the index.<br><br>Yes it should be the same result because when GstBaseSrc reachs num_buffers_left = 0 then it return GST_FLOW_UNEXPECTED then an EOS is generated.<br>

<br>So something is not flushed when ffmux receive eos in the first way.<br><br>Is it a bug from gstffmpegmux or a problem in ffmpeg-asfmux-libavcodec ? or something else ?<br><br>( ./test 0 rec.asf&nbsp;&nbsp; -&gt; index not written)&nbsp; (eos sent from a g_timeout_add callback)<br>

( ./test 1 rec.asf&nbsp;&nbsp; -&gt; asf correclty generated)&nbsp; (use num_buffers=N)<br><br>Sincerely<br><font color="#888888"><br>Julien<br>
</font></blockquote></div><br>