> On Jul 28, 2020, at 4:05 PM, Nicolas George <geo...@nsup.org> wrote:
> 
> Jean-Baptiste Kempf (12020-07-28):
>> How is that different from open_memstream, which is done for this exact 
>> purpose?
> 
> I am not sure what you are referring to, I do not find a function by
> that name in FFmpeg.

I think jb is referring to

     FILE *open_memstream(char **bufp, size_t *sizep);
https://linux.die.net/man/3/open_memstream 
<https://linux.die.net/man/3/open_memstream>

VLC has a wrapper for it:

https://code.videolan.org/videolan/vlc/-/blob/master/include/vlc_memstream.h 
<https://code.videolan.org/videolan/vlc/-/blob/master/include/vlc_memstream.h>
> 
> Are you referring to avio_open_dyn_buf()?
> 
> If so, there are three differences:
> 
> - avio_open_dyn_buf() resides in libavformat, and therefore is only
>  available for a tiny portion of the project. I had a vague project to
>  move part of AVIO to lavu, but it is huge work.
> 
> - avio_open_dyn_buf() always uses dynamic allocation. AVWriter starts
>  entirely on the stack (or whatever we want), and only resorts to
>  dynamic allocation if the buffer becomes too large. As a corollary,
>  avio_open_dyn_buf() requires an error check at the beginning, which
>  AVWriter does not.
> 
> - AVWriter is polymorphic. I have shown only av_dynbuf_writer(), but
>  there are others, and applications can implement their own. That is
>  the key to the "wonderful features" I have evoked. I would be happy to
>  tell more about them.
> 
> Regards,
> 
> -- 
>  Nicolas George
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to