summaryrefslogtreecommitdiff
path: root/libavformat/internal.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-12-05 18:52:29 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-12-08 00:42:48 +0100
commite38eaf47491a864b2180d1ade87ed0ef39dd6d34 (patch)
treeeaf47cc5cd738a86e4e0f05f4657c7ea7114dbca /libavformat/internal.h
parentb09ea67b40e342f5e4183e9ebc0c14801ecd218c (diff)
avformat/utils: Make ff_data_to_hex() zero-terminate the string
Most callers want it that way anyway. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/internal.h')
-rw-r--r--libavformat/internal.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavformat/internal.h b/libavformat/internal.h
index 20e93d9267..f43e408548 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -484,6 +484,17 @@ void ff_flush_packet_queue(AVFormatContext *s);
*/
int ff_mkdir_p(const char *path);
+/**
+ * Write hexadecimal string corresponding to given binary data. The string
+ * is zero-terminated.
+ *
+ * @param buf the output string is written here;
+ * needs to be at least 2 * size + 1 bytes long.
+ * @param src the input data to be transformed.
+ * @param size the size (in byte) of src.
+ * @param lowercase determines whether to use the range [0-9a-f] or [0-9A-F].
+ * @return buf.
+ */
char *ff_data_to_hex(char *buf, const uint8_t *src, int size, int lowercase);
/**