<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello All,<br>
<br>
I have a program that the user can start and stop recording video at
their will. Each time the user starts recording, the video is saved
to a new file. The problem is if the user decides to delete a newly
created video without shutting down my program first, then he is
unable to do so. Windows tells the user that my program still has
the file open. Here is my code when the user stops recording.<br>
<br>
<span style=" color:#646482;"> </span>av_write_trailer(<span
style=" font-weight:600;">m_oc</span>);
<br>
<br>
<br>
avcodec_close(<span style=" font-weight:600;">m_videoCodecCTX</span>);<br>
<br>
avcodec_close(<span style=" font-weight:600;">m_audioCodecCTX</span>);<br>
<br>
sws_freeContext(<span style=" font-weight:600;">m_video_st</span>.<span
style=" font-weight:600;">sws_ctx</span>);<br>
<br>
avformat_free_context(<span style=" font-weight:600;">m_oc</span>);<br>
<br>
av_frame_free(&<span style=" font-weight:600;">m_videoPicture</span>);<br>
<br>
<br>
What am I missing?<br>
<br>
Thanks,<br>
Kevin<br>
<br>
<br>
</body>
</html>