[Libav-user] File does not seem to close
Kevin J. Brooks
kbrooks at r2c-ss.com
Thu Aug 20 20:18:55 CEST 2015
I am using "av_interleaved_write_frame" to write the video frames. The
plan is to add audio capture from a microphone as well.
I noticed avio_close_dyn_buf is wanting a pointer to a buffer. Since I
don't explicitly create a buffer, I don't know where I should get it.
Sincerely,
Kevin J. Brooks
Senior Software Engineer
R2C Support Services
On 8/20/2015 12:22 PM, cesar pachon wrote:
> maybe you are buffering the video before writing to the file?
>
> In my case I use a dynbuffer so I need to call avio_close_dyn_buf
> after avcodec_close, and sws_freeContext.
>
>
>
> Cesar Pachón
> -------------------------------------------------------------
> www.cesarpachon.com <http://www.cesarpachon.com>, just a digital hermit
>
>
> On Thu, Aug 20, 2015 at 11:48 AM, Kevin J. Brooks <kbrooks at r2c-ss.com
> <mailto:kbrooks at r2c-ss.com>> wrote:
>
> Hello All,
>
> I am using the following function call to open the file for
> encoding video:
>
> avformat_alloc_output_context2(&m_oc, m_fmt, NULL, filePath.c_str());
>
> Then when I want to stop recording the video, I use this function
> to free it:
>
> avformat_free_context(m_oc);
>
> 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.
>
> 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?
>
>
>
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20150820/7c84200c/attachment.html>
More information about the Libav-user
mailing list