From a6d29494ca6e45b66570deda99c2eef79f72d16c Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 29 Jan 2017 12:53:58 +0100 Subject: [PATCH] player: print hw format on "VO: " line too Useful for distinguishing bit depth when hardware decoding. (To the degree it's useful to show it at all. This just brings the hardware decoding case on the same level of showing information as the software decode call.) --- player/video.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/player/video.c b/player/video.c index 79828aa6ce..6ea3e4c6e8 100644 --- a/player/video.c +++ b/player/video.c @@ -1430,8 +1430,11 @@ void write_video(struct MPContext *mpctx) mp_image_params_get_dsize(&p, &d_w, &d_h); snprintf(extra, sizeof(extra), " => %dx%d", d_w, d_h); } - MP_INFO(mpctx, "VO: [%s] %dx%d%s %s\n", - info->name, p.w, p.h, extra, vo_format_name(p.imgfmt)); + char sfmt[20] = {0}; + if (p.hw_subfmt) + snprintf(sfmt, sizeof(sfmt), "[%s]", mp_imgfmt_to_name(p.hw_subfmt)); + MP_INFO(mpctx, "VO: [%s] %dx%d%s %s%s\n", + info->name, p.w, p.h, extra, mp_imgfmt_to_name(p.imgfmt), sfmt); MP_VERBOSE(mpctx, "VO: Description: %s\n", info->description); int vo_r = vo_reconfig(vo, &p);