aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/vorbiscomment.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-04-28 03:03:36 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-05-03 12:45:01 +0200
commit704d7c9f4616d71db1a1baa0a1726c77a9957521 (patch)
treeabfc5d5e7fdfb048c34ddce48d5db951471d9ce4 /libavformat/vorbiscomment.c
parentca0a38f2f7803ab8fa12913d0385d4c70f8d6345 (diff)
downloadffmpeg-704d7c9f4616d71db1a1baa0a1726c77a9957521.tar.gz
avformat/vorbiscomment: Replace AVDictionary ** by const AVDictionary *
ff_vorbiscomment_write() used an AVDictionary ** parameter for a dictionary whose contents ought to be written; yet this can be replaced by AVDictionary * since commit 042ca05f0fdc5f4d56a3e9b94bc9cd67bca9a4bc; and this in turn can be replaced by const AVDictionary * to indicate that the dictionary isn't modified; the latter also applies to ff_vorbiscomment_length(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat/vorbiscomment.c')
-rw-r--r--libavformat/vorbiscomment.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/vorbiscomment.c b/libavformat/vorbiscomment.c
index fb5c655a23..edaeae2772 100644
--- a/libavformat/vorbiscomment.c
+++ b/libavformat/vorbiscomment.c
@@ -38,7 +38,7 @@ const AVMetadataConv ff_vorbiscomment_metadata_conv[] = {
{ 0 }
};
-int64_t ff_vorbiscomment_length(AVDictionary *m, const char *vendor_string,
+int64_t ff_vorbiscomment_length(const AVDictionary *m, const char *vendor_string,
AVChapter **chapters, unsigned int nb_chapters)
{
int64_t len = 8;
@@ -62,7 +62,7 @@ int64_t ff_vorbiscomment_length(AVDictionary *m, const char *vendor_string,
return len;
}
-int ff_vorbiscomment_write(uint8_t **p, AVDictionary **m,
+int ff_vorbiscomment_write(uint8_t **p, const AVDictionary *m,
const char *vendor_string,
AVChapter **chapters, unsigned int nb_chapters)
{
@@ -74,11 +74,11 @@ int ff_vorbiscomment_write(uint8_t **p, AVDictionary **m,
cm_count += av_dict_count(chapters[i]->metadata) + 1;
}
}
- if (*m) {
- int count = av_dict_count(*m) + cm_count;
+ if (m) {
+ int count = av_dict_count(m) + cm_count;
AVDictionaryEntry *tag = NULL;
bytestream_put_le32(p, count);
- while ((tag = av_dict_get(*m, "", tag, AV_DICT_IGNORE_SUFFIX))) {
+ while ((tag = av_dict_get(m, "", tag, AV_DICT_IGNORE_SUFFIX))) {
int64_t len1 = strlen(tag->key);
int64_t len2 = strlen(tag->value);
if (len1+1+len2 > UINT32_MAX)