diff options
Diffstat (limited to '')
-rw-r--r-- | src/decoder/ffmpeg_metadata.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/decoder/ffmpeg_metadata.c b/src/decoder/ffmpeg_metadata.c index 5325c1cae..df700fc01 100644 --- a/src/decoder/ffmpeg_metadata.c +++ b/src/decoder/ffmpeg_metadata.c @@ -50,6 +50,21 @@ ffmpeg_copy_metadata(enum tag_type type, type, mt->value); } +#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51,5,0) + +static void +ffmpeg_scan_pairs(AVDictionary *dict, + const struct tag_handler *handler, void *handler_ctx) +{ + AVDictionaryEntry *i = NULL; + + while ((i = av_dict_get(dict, "", i, AV_DICT_IGNORE_SUFFIX)) != NULL) + tag_handler_invoke_pair(handler, handler_ctx, + i->key, i->value); +} + +#endif + void ffmpeg_scan_dictionary(AVDictionary *dict, const struct tag_handler *handler, void *handler_ctx) @@ -62,4 +77,9 @@ ffmpeg_scan_dictionary(AVDictionary *dict, i->name != NULL; ++i) ffmpeg_copy_metadata(i->type, dict, i->name, handler, handler_ctx); + +#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51,5,0) + if (handler->pair != NULL) + ffmpeg_scan_pairs(dict, handler, handler_ctx); +#endif } |