You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avformat/hls: use av_dict_iterate
And constify oldentry too while at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
committed by
Andreas Rheinhardt
parent
b463ef0339
commit
6c4f23cc20
@@ -1104,10 +1104,10 @@ static void parse_id3(AVFormatContext *s, AVIOContext *pb,
|
|||||||
static int id3_has_changed_values(struct playlist *pls, AVDictionary *metadata,
|
static int id3_has_changed_values(struct playlist *pls, AVDictionary *metadata,
|
||||||
ID3v2ExtraMetaAPIC *apic)
|
ID3v2ExtraMetaAPIC *apic)
|
||||||
{
|
{
|
||||||
AVDictionaryEntry *entry = NULL;
|
const AVDictionaryEntry *entry = NULL;
|
||||||
AVDictionaryEntry *oldentry;
|
const AVDictionaryEntry *oldentry;
|
||||||
/* check that no keys have changed values */
|
/* 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);
|
oldentry = av_dict_get(pls->id3_initial, entry->key, NULL, AV_DICT_MATCH_CASE);
|
||||||
if (!oldentry || strcmp(oldentry->value, entry->value) != 0)
|
if (!oldentry || strcmp(oldentry->value, entry->value) != 0)
|
||||||
return 1;
|
return 1;
|
||||||
|
Reference in New Issue
Block a user