summaryrefslogtreecommitdiffstats
path: root/video/decode/dec_video.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-09-20 15:40:44 +0200
committerwm4 <wm4@nowhere>2016-09-20 15:44:26 +0200
commit89674854ceaae9c0a9d8f24b9a24fb2f24df6bb1 (patch)
tree62b82f937c1ff0d08f788ab26920f3ae10995aba /video/decode/dec_video.c
parent23639e5b0ea5d4af50a2d5aedef11cd240e2390c (diff)
downloadmpv-89674854ceaae9c0a9d8f24b9a24fb2f24df6bb1.tar.bz2
mpv-89674854ceaae9c0a9d8f24b9a24fb2f24df6bb1.tar.xz
command: add a video-dec-params property
This is the actual decoder output, with no overrides applied. (Maybe video-params shouldn't contain the overrides in the first place, but damage done.)
Diffstat (limited to 'video/decode/dec_video.c')
-rw-r--r--video/decode/dec_video.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/video/decode/dec_video.c b/video/decode/dec_video.c
index 02fa334e2b..7e144a72bc 100644
--- a/video/decode/dec_video.c
+++ b/video/decode/dec_video.c
@@ -192,6 +192,7 @@ static void fix_image_params(struct dec_video *d_video,
struct mp_codec_params *c = d_video->codec;
MP_VERBOSE(d_video, "Decoder format: %s\n", mp_image_params_to_str(params));
+ d_video->dec_format = *params;
// While mp_image_params normally always have to have d_w/d_h set, the
// decoder signals unknown bitstream aspect ratio with both set to 0.
@@ -353,6 +354,11 @@ void video_reset_params(struct dec_video *d_video)
d_video->last_format = (struct mp_image_params){0};
}
+void video_get_dec_params(struct dec_video *d_video, struct mp_image_params *p)
+{
+ *p = d_video->dec_format;
+}
+
void video_set_framedrop(struct dec_video *d_video, bool enabled)
{
d_video->framedrop_enabled = enabled;