<div dir="ltr">maybe you are buffering the video before writing to the file? <br><br>In my case I use a dynbuffer so I need to call avio_close_dyn_buf after avcodec_close, and sws_freeContext. <br><br><br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">Cesar Pachón<br>-------------------------------------------------------------<br><a href="http://www.cesarpachon.com" target="_blank">www.cesarpachon.com</a>, just a digital hermit<br><br></div></div></div>
<br><div class="gmail_quote">On Thu, Aug 20, 2015 at 11:48 AM, Kevin J. Brooks <span dir="ltr"><<a href="mailto:kbrooks@r2c-ss.com" target="_blank">kbrooks@r2c-ss.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div alink="#EE0000" bgcolor="#ffffff" link="#0B6CDA" text="#000000" vlink="#551A8B">
Hello All,<br>
<br>
I am using the following function call to open the file for encoding
video:<br>
<br>
avformat_alloc_output_context2(&<span style="font-weight:600">m_oc</span>,
<span style="font-weight:600">m_fmt</span>, NULL, filePath.c_str());<br>
<br>
Then when I want to stop recording the video, I use this function to
free it:<br>
<br>
avformat_free_context(<span style="font-weight:600">m_oc</span>);<br>
<br>
The issue is, if my program is still running and the user opens
Windows Explorer, the file size is showing as zero. Also, inside my
program the user can browse the directory and delete videos. If the
user tries to delete a video that was created during the current
session, the file will not delete. The user can open it and play
it, however.<br>
<br>
I am assuming there is another function call I need to make to
properly close the file. Can anyone tell me what call I am missing?<span class="HOEnZb"><font color="#888888"><br>
<br>
<div>-- <br>
Sincerely,<span style="font-size:12.0pt;color:#0070c0"><br>
Kevin J. Brooks<u></u><u></u></span><span style="font-size:12.0pt;color:#0070c0"><br>
Senior Software Engineer<u></u><u></u></span><span style="font-size:14.0pt;color:black"><br>
R2C Support Services<u></u><u></u></span><span style="font-size:14.0pt;color:black"><br>
200 West Side Square Suite 604<u></u><u></u></span><span style="font-size:14.0pt;color:black"><br>
Huntsville, AL 35801</span><span style="font-size:14.0pt;color:black"><br>
Office: <a href="tel:256-684-8383%20ext.%20104" value="+12566848383" target="_blank">256-684-8383 ext. 104</a><u></u><u></u></span> <br>
<br>
<img alt="" src="cid:part1.02050905.02010901@r2c-ss.com" height="281" width="281"><br>
</div>
</font></span></div>
<br>_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br></blockquote></div><br></div>