mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
libeplayer3/container_ffmpeg: fix metadata access
This commit is contained in:
@@ -256,7 +256,7 @@ float getDurationFromSSALine(unsigned char *line)
|
|||||||
return (float) msec / 1000.0;
|
return (float) msec / 1000.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* search for metatdata in context and stream
|
/* search for metadata in context and stream
|
||||||
* and map it to our metadata.
|
* and map it to our metadata.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -265,15 +265,12 @@ static char *searchMeta(AVDictionary * metadata, char *ourTag)
|
|||||||
AVDictionaryEntry *tag = NULL;
|
AVDictionaryEntry *tag = NULL;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
while (metadata_map[i] != NULL) {
|
while (metadata_map[i]) {
|
||||||
if (strcmp(ourTag, metadata_map[i]) == 0) {
|
if (!strcasecmp(ourTag, metadata_map[i]))
|
||||||
while ((tag = av_dict_get(metadata, "", tag, AV_DICT_IGNORE_SUFFIX))) {
|
while ((tag = av_dict_get(metadata, "", tag, AV_DICT_IGNORE_SUFFIX)))
|
||||||
if (strcmp(tag->key, metadata_map[i + 1]) == 0) {
|
if (!strcasecmp(tag->key, ourTag) || !strcmp(tag->key, metadata_map[i + 1]))
|
||||||
return tag->value;
|
return tag->value;
|
||||||
}
|
i += 2;
|
||||||
}
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Reference in New Issue
Block a user