mirror of https://github.com/mpv-player/mpv
f_decoder_wrapper: change video-codec to show description or name
Not both of them. Formating it as `<name> (<desc>)` produced arguably silly string like `hevc (HEVC (High Efficiency Video Coding))`. Unpack this to show only description if available or name otherwise. Produces way nicer results in stats.lua and similar places where this name is printed.
This commit is contained in:
parent
c4f0b24deb
commit
72536cce62
|
@ -99,6 +99,7 @@ Interface changes
|
||||||
- deprecate `--demuxer-cue-codepage` in favor of `--metadata-codepage`
|
- deprecate `--demuxer-cue-codepage` in favor of `--metadata-codepage`
|
||||||
- change the default of `metadata-codepage` to `auto`
|
- change the default of `metadata-codepage` to `auto`
|
||||||
- add `playlist-next-playlist` and `playlist-prev-playlist` commands
|
- add `playlist-next-playlist` and `playlist-prev-playlist` commands
|
||||||
|
- change `video-codec` to show description or name, not both
|
||||||
--- mpv 0.36.0 ---
|
--- mpv 0.36.0 ---
|
||||||
- add `--target-contrast`
|
- add `--target-contrast`
|
||||||
- Target luminance value is now also applied when ICC profile is used.
|
- Target luminance value is now also applied when ICC profile is used.
|
||||||
|
|
|
@ -450,8 +450,8 @@ static bool reinit_decoder(struct priv *p)
|
||||||
p->decoder = driver->create(p->decf, p->codec, sel->decoder);
|
p->decoder = driver->create(p->decf, p->codec, sel->decoder);
|
||||||
if (p->decoder) {
|
if (p->decoder) {
|
||||||
pthread_mutex_lock(&p->cache_lock);
|
pthread_mutex_lock(&p->cache_lock);
|
||||||
p->decoder_desc =
|
const char *d = sel->desc && sel->desc[0] ? sel->desc : sel->decoder;
|
||||||
talloc_asprintf(p, "%s (%s)", sel->decoder, sel->desc);
|
p->decoder_desc = talloc_strdup(p, d);
|
||||||
MP_VERBOSE(p, "Selected codec: %s\n", p->decoder_desc);
|
MP_VERBOSE(p, "Selected codec: %s\n", p->decoder_desc);
|
||||||
pthread_mutex_unlock(&p->cache_lock);
|
pthread_mutex_unlock(&p->cache_lock);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue