[Libav-user] Flushing AVIOContext
    Michael IV 
    explomaster at gmail.com
       
    Fri Nov 24 21:48:08 EET 2017
    
    
  
Hi!
I am trying to reuse AVIOContext.
I call avio_flush() after finihsing muxing and before starting next session.
But in this case the output video is corrupted.The corruption is in the
header.The AVCC info is missing,which leads me to think that the first
thing the avio does at the
beginning of the next session is to write some leftovers from the previous
session.
I found that only when completely distroying AVIOContext and then
allocating it again:
avio_alloc_context(mIOBufferOut, (int)buffSize, 1, this, NULL,
IO_write_packet, NULL);
it works.I even tried to free and re-allocate the internal buffer of
AVIOContext,and it doesn't help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20171124/45aeb109/attachment.html>
    
    
More information about the Libav-user
mailing list