Re: [FFmpeg-devel] [PATCH 1/2] libavformat/avio: Add avio_get_dyn_buf function

2017-01-07 Thread Michael Niedermayer
On Sat, Jan 07, 2017 at 03:38:48AM +, Soft Works wrote:
> > Michael wrote
> > Is the author name intended to be
> > Author: softworkz 
> 
> Yes please, if you don't mind, same as my previous commit: 
> http://git.videolan.org/?p=ffmpeg.git;a=commit;h=70c1647a3501fa6182c04c9ce66f477def64a611

applied


> 
> PS: On behalf of the Emby project, I'd like to thank you for your kind 
> assistance!
> (https://emby.media/)
> 
> Thank you very much,

thanks as well


[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you think the mosad wants you dead since a long time then you are either
wrong or dead since a long time.


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] libavformat/avio: Add avio_get_dyn_buf function

2017-01-06 Thread Soft Works
> Michael wrote
> Is the author name intended to be
> Author: softworkz 

Yes please, if you don't mind, same as my previous commit: 
http://git.videolan.org/?p=ffmpeg.git;a=commit;h=70c1647a3501fa6182c04c9ce66f477def64a611

PS: On behalf of the Emby project, I'd like to thank you for your kind 
assistance!
(https://emby.media/)

Thank you very much,

softworkz
(https://github.com/softworkz)
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] libavformat/avio: Add avio_get_dyn_buf function

2017-01-06 Thread Michael Niedermayer
On Fri, Jan 06, 2017 at 09:14:59PM +, Soft Works wrote:
> [PATCH] libavformat/avio: Add avio_get_dyn_buf function
> 
> Revision #2: Bumb version and add APIchanges entry
> 
> 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.
> ---
>  doc/APIchanges|  3 +++
>  libavformat/avio.h| 12 
>  libavformat/aviobuf.c | 17 +
>  libavformat/version.h |  2 +-
>  4 files changed, 33 insertions(+), 1 deletion(-)

Is the author name intended to be
Author: softworkz 
?

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] libavformat/avio: Add avio_get_dyn_buf function

2017-01-06 Thread Soft Works
[PATCH] libavformat/avio: Add avio_get_dyn_buf function

Revision #2: Bumb version and add APIchanges entry

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.
---
 doc/APIchanges|  3 +++
 libavformat/avio.h| 12 
 libavformat/aviobuf.c | 17 +
 libavformat/version.h |  2 +-
 4 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index fbeae7a..3279563 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,9 @@ libavutil: 2015-08-28
 
 API changes, most recent first:
 
+2017-01-06 - xxx - lavf 57.62.100- avio.h
+  Add avio_get_dyn_buf()
+
 2016-12-10 - xxx - lavu xx.xx.100- imgutils.h
   Add av_image_check_size2()
 
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);
+
+/**
  * Return the written size and a pointer to the buffer. The buffer
  * must be freed with av_free().
  * Padding of AV_INPUT_BUFFER_PADDING_SIZE is added to the buffer.
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 134d627..bf7e5f8 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -1277,6 +1277,23 @@ int ffio_open_dyn_packet_buf(AVIOContext **s, int 
max_packet_size)
 return url_open_dyn_buf_internal(s, max_packet_size);
 }
 
+int avio_get_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
+{
+DynBuffer *d;
+
+if (!s) {
+*pbuffer = NULL;
+return 0;
+}
+
+avio_flush(s);
+
+d = s->opaque;
+*pbuffer = d->buffer;
+
+return d->size;
+}
+
 int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
 {
 DynBuffer *d;
diff --git a/libavformat/version.h b/libavformat/version.h
index 65e6a4c..21cc8a9 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -32,7 +32,7 @@
 // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
 // Also please add any ticket numbers that you believe might be affected here
 #define LIBAVFORMAT_VERSION_MAJOR  57
-#define LIBAVFORMAT_VERSION_MINOR  61
+#define LIBAVFORMAT_VERSION_MINOR  62
 #define LIBAVFORMAT_VERSION_MICRO 100
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
-- 
2.10.2.windows.1



0002-libavformat-avio-Add-avio_get_dyn_buf-function.patch
Description: 0002-libavformat-avio-Add-avio_get_dyn_buf-function.patch
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] libavformat/avio: Add avio_get_dyn_buf function

2017-01-06 Thread Michael Niedermayer
On Thu, Jan 05, 2017 at 06:06:27PM +, 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


[FFmpeg-devel] [PATCH 1/2] libavformat/avio: Add avio_get_dyn_buf function

2017-01-05 Thread Soft Works
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);
+
+/**
  * Return the written size and a pointer to the buffer. The buffer
  * must be freed with av_free().
  * Padding of AV_INPUT_BUFFER_PADDING_SIZE is added to the buffer.
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 134d627..bf7e5f8 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -1277,6 +1277,23 @@ int ffio_open_dyn_packet_buf(AVIOContext **s, int 
max_packet_size)
 return url_open_dyn_buf_internal(s, max_packet_size);
 }
 
+int avio_get_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
+{
+DynBuffer *d;
+
+if (!s) {
+*pbuffer = NULL;
+return 0;
+}
+
+avio_flush(s);
+
+d = s->opaque;
+*pbuffer = d->buffer;
+
+return d->size;
+}
+
 int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
 {
 DynBuffer *d;
-- 
2.10.2.windows.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel