From 2c9b05c398412852180497b43d015d3a1cdfcad0 Mon Sep 17 00:00:00 2001 From: qianlongxu Date: Fri, 15 Nov 2024 14:28:57 +0800 Subject: [PATCH] #53, ic meta Use prefix matching rules --- CHANGELOG.md | 1 + README.md | 6 +++--- ijkmedia/ijkplayer/ijkmeta.c | 10 +++++----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 560c9b8d58..755a54c19a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ tag k0.11.9 - all libs using macOS 14 and remove bitcode support - fix smb2 url not allow longer than 1024 characters question +- ic meta Use prefix matching rules,#53 tag k0.11.8 -------------------------------- diff --git a/README.md b/README.md index 1a48a55339..4cb2a0d8ed 100644 --- a/README.md +++ b/README.md @@ -72,9 +72,9 @@ cd ijkplayer git checkout -B latest k0.11.8 git submodule update --init -./FFToolChain/main.sh install -p macos -l 'ass ffmpeg smb2' -./FFToolChain/main.sh install -p ios -l 'ass ffmpeg smb2' -./FFToolChain/main.sh install -p tvos -l 'ass ffmpeg smb2' +./FFToolChain/main.sh install -p macos -l 'ass ffmpeg' +./FFToolChain/main.sh install -p ios -l 'ass ffmpeg' +./FFToolChain/main.sh install -p tvos -l 'ass ffmpeg' pod install --project-directory=./examples/macos pod install --project-directory=./examples/ios diff --git a/ijkmedia/ijkplayer/ijkmeta.c b/ijkmedia/ijkplayer/ijkmeta.c index d690c3e26a..7e71fba30e 100755 --- a/ijkmedia/ijkplayer/ijkmeta.c +++ b/ijkmedia/ijkplayer/ijkmeta.c @@ -241,7 +241,7 @@ void ijkmeta_set_avformat_context_l(IjkMediaMeta *meta, AVFormatContext *ic) char **ic_key_header = ic_string_val_keys; char *ic_key; while ((ic_key = *ic_key_header)) { - AVDictionaryEntry *entry = av_dict_get(ic->metadata, ic_key, NULL, 0); + AVDictionaryEntry *entry = av_dict_get(ic->metadata, ic_key, NULL, AV_DICT_IGNORE_SUFFIX); if (entry && entry->value) ijkmeta_set_string_l(meta, ic_key, entry->value); ic_key_header++; @@ -349,24 +349,24 @@ void ijkmeta_set_avformat_context_l(IjkMediaMeta *meta, AVFormatContext *ic) if (codecpar->sample_rate) ijkmeta_set_int64_l(stream_meta, IJKM_KEY_SAMPLE_RATE, codecpar->sample_rate); - AVDictionaryEntry *lang = av_dict_get(st->metadata, IJKM_KEY_LANGUAGE, NULL, 0); + AVDictionaryEntry *lang = av_dict_get(st->metadata, IJKM_KEY_LANGUAGE, NULL, AV_DICT_IGNORE_SUFFIX); if (lang && lang->value) ijkmeta_set_string_l(stream_meta, IJKM_KEY_LANGUAGE, lang->value); char describe[64]; if (av_channel_layout_describe(&codecpar->ch_layout, describe, sizeof(describe)) > 0) { ijkmeta_set_string_l(stream_meta, IJKM_KEY_DESCRIBE, describe); } - AVDictionaryEntry *title = av_dict_get(st->metadata, IJKM_KEY_TITLE, NULL, 0); + AVDictionaryEntry *title = av_dict_get(st->metadata, IJKM_KEY_TITLE, NULL, AV_DICT_IGNORE_SUFFIX); if (title && title->value) ijkmeta_set_string_l(stream_meta, IJKM_KEY_TITLE, title->value); break; } case AVMEDIA_TYPE_SUBTITLE: { ijkmeta_set_string_l(stream_meta, IJKM_KEY_TYPE, IJKM_VAL_TYPE__TIMEDTEXT); - AVDictionaryEntry *lang = av_dict_get(st->metadata, IJKM_KEY_LANGUAGE, NULL, 0); + AVDictionaryEntry *lang = av_dict_get(st->metadata, IJKM_KEY_LANGUAGE, NULL, AV_DICT_IGNORE_SUFFIX); if (lang && lang->value) ijkmeta_set_string_l(stream_meta, IJKM_KEY_LANGUAGE, lang->value); - AVDictionaryEntry *title = av_dict_get(st->metadata, IJKM_KEY_TITLE, NULL, 0); + AVDictionaryEntry *title = av_dict_get(st->metadata, IJKM_KEY_TITLE, NULL, AV_DICT_IGNORE_SUFFIX); if (title && title->value) ijkmeta_set_string_l(stream_meta, IJKM_KEY_TITLE, title->value); break;