[vlc-commits] codec: opus: fix types in comment_add
Francois Cartegnie
git at videolan.org
Wed Dec 7 20:04:27 CET 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Dec 7 19:59:21 2016 +0100| [d75f89203bcf7bac331f789a6c08d6d87523706d] | committer: Francois Cartegnie
codec: opus: fix types in comment_add
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d75f89203bcf7bac331f789a6c08d6d87523706d
---
modules/codec/opus_header.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/codec/opus_header.c b/modules/codec/opus_header.c
index ef6eec5..d00cfdd 100644
--- a/modules/codec/opus_header.c
+++ b/modules/codec/opus_header.c
@@ -240,10 +240,10 @@ static char *comment_init(size_t *length, const char *vendor)
/*The 'vendor' field should be the actual encoding library used.*/
if (!vendor)
vendor = "unknown";
- int vendor_length = strlen(vendor);
+ size_t vendor_length = strlen(vendor);
- int user_comment_list_length = 0;
- int len = 8 + 4 + vendor_length + 4;
+ size_t user_comment_list_length = 0;
+ size_t len = 8 + 4 + vendor_length + 4;
char *p = malloc(len);
if (p == NULL)
return NULL;
@@ -261,7 +261,7 @@ static int comment_add(char **comments, size_t *length, const char *tag,
const char *val)
{
char *p = *comments;
- int vendor_length = GetDWLE(p + 8);
+ uint32_t vendor_length = GetDWLE(p + 8);
size_t user_comment_list_length = GetDWLE(p + 8 + 4 + vendor_length);
size_t tag_len = (tag ? strlen(tag) : 0);
size_t val_len = strlen(val);
More information about the vlc-commits
mailing list