Skip to content

Commit

Permalink
#53, ic meta Use prefix matching rules
Browse files Browse the repository at this point in the history
  • Loading branch information
debugly committed Nov 15, 2024
1 parent 824eb22 commit 2c9b05c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
--------------------------------
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions ijkmedia/ijkplayer/ijkmeta.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 2c9b05c

Please sign in to comment.