summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2024-04-10 21:24:06 +0200
committerKacper Michajłow <kasper93@gmail.com>2024-04-15 19:34:40 +0200
commite720159f72be2a816db849acb286f36a1ac4622b (patch)
tree8ea4ca753638abc96c16af0e8972194d39a51a57 /video
parent3995cd3714d2768f56c234633d1839f83746233b (diff)
downloadmpv-e720159f72be2a816db849acb286f36a1ac4622b.tar.bz2
mpv-e720159f72be2a816db849acb286f36a1ac4622b.tar.xz
player/command: add video-codec-info and audio-codec-info
Adds support for extracting codec profile. Old properties are redirected to new one and removed from docs. Likely will stay like that forever as there is no reason to remove them. As a effect of unification of properties between audio and video, video-codec will now print codec (format) descriptive name, not decoder long name as it were before. In practice this change fixes what docs says. If you really need decoder name, use the `track-list/N/decoder-desc`.
Diffstat (limited to 'video')
-rw-r--r--video/decode/vd_lavc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index 8756a59b11..05b66edbd8 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -1215,6 +1215,8 @@ static int decode_frame(struct mp_filter *vd)
return ret;
}
+ mp_codec_info_from_av(avctx, ctx->codec);
+
// If something was decoded successfully, it must return a frame with valid
// data.
assert(ctx->pic->buf[0]);
@@ -1443,6 +1445,9 @@ static struct mp_decoder *create(struct mp_filter *parent,
talloc_free(vd);
return NULL;
}
+
+ codec->codec_desc = ctx->avctx->codec_descriptor->long_name;
+
return &ctx->public;
}