[FFmpeg-cvslog] avformat/hls: use av_dict_iterate

Marvin Scholz git at videolan.org
Thu Dec 1 12:39:43 EET 2022


ffmpeg | branch: master | Marvin Scholz <epirat07 at gmail.com> | Sat Nov 26 15:46:37 2022 +0100| [6c4f23cc206f0b034ebfb767d0f35c586c5d2b1e] | committer: Andreas Rheinhardt

avformat/hls: use av_dict_iterate

And constify oldentry too while at it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6c4f23cc206f0b034ebfb767d0f35c586c5d2b1e
---

 libavformat/hls.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index 402eb2b5a0..926d053939 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -1104,10 +1104,10 @@ static void parse_id3(AVFormatContext *s, AVIOContext *pb,
 static int id3_has_changed_values(struct playlist *pls, AVDictionary *metadata,
                                   ID3v2ExtraMetaAPIC *apic)
 {
-    AVDictionaryEntry *entry = NULL;
-    AVDictionaryEntry *oldentry;
+    const AVDictionaryEntry *entry = NULL;
+    const AVDictionaryEntry *oldentry;
     /* check that no keys have changed values */
-    while ((entry = av_dict_get(metadata, "", entry, AV_DICT_IGNORE_SUFFIX))) {
+    while ((entry = av_dict_iterate(metadata, entry))) {
         oldentry = av_dict_get(pls->id3_initial, entry->key, NULL, AV_DICT_MATCH_CASE);
         if (!oldentry || strcmp(oldentry->value, entry->value) != 0)
             return 1;



More information about the ffmpeg-cvslog mailing list