[Libav-user] File does not seem to close

cesar pachon cesarpachon at gmail.com
Thu Aug 20 19:22:50 CEST 2015


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, just a digital hermit


On Thu, Aug 20, 2015 at 11:48 AM, Kevin J. Brooks <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?
>
> --
> Sincerely,
> Kevin J. Brooks
> Senior Software Engineer
> R2C Support Services
> 200 West Side Square Suite 604
> Huntsville, AL 35801
> Office: 256-684-8383 ext. 104
>
>
>
> _______________________________________________
> 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/fffc3ee3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sdvosb.png
Type: image/png
Size: 145202 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20150820/fffc3ee3/attachment.png>


More information about the Libav-user mailing list