On Thu, Jan 05, 2017 at 06:06:27PM +0000, Soft Works wrote: > This commit adds the avio_get_dyn_buf function which allows accessing the > content of a DynBuffer without destroying it. > > This is required in matroskaenc for preliminary writing (correct) mkv headers. > > Context for this change is fixing regression bug #5977. > --- > libavformat/avio.h | 12 ++++++++++++ > libavformat/aviobuf.c | 17 +++++++++++++++++ > 2 files changed, 29 insertions(+) > > diff --git a/libavformat/avio.h b/libavformat/avio.h > index b1ce1d1..f2b9a6f 100644 > --- a/libavformat/avio.h > +++ b/libavformat/avio.h > @@ -704,6 +704,18 @@ int avio_closep(AVIOContext **s); > int avio_open_dyn_buf(AVIOContext **s); > > /** > + * Return the written size and a pointer to the buffer. > + * The AVIOContext stream is left intact. > + * The buffer must NOT be freed. > + * No padding is added to the buffer. > + * > + * @param s IO context > + * @param pbuffer pointer to a byte buffer > + * @return the length of the byte buffer > + */ > +int avio_get_dyn_buf(AVIOContext *s, uint8_t **pbuffer);
adding a public function (av*) needs minor version bump (libavformat/version.h) and doc/APIchanges entry thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws. -- Plato
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel