diff options
-rw-r--r-- | video/decode/vd.h | 1 | ||||
-rw-r--r-- | video/decode/vd_lavc.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/video/decode/vd.h b/video/decode/vd.h index ca4107dca9..3142151373 100644 --- a/video/decode/vd.h +++ b/video/decode/vd.h @@ -40,6 +40,7 @@ typedef struct vd_functions // NULL terminated array of all drivers extern const vd_functions_t *const mpcodecs_vd_drivers[]; +#define VDCTRL_GET_PARAMS 1 // retrieve struct mp_image_params #define VDCTRL_RESYNC_STREAM 8 // reset decode state after seeking #define VDCTRL_QUERY_UNSEEN_FRAMES 9 // current decoder lag #define VDCTRL_REINIT_VO 10 // reinit filter/VO chain diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 3b266aeb94..978462fbe5 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -757,6 +757,9 @@ static int control(sh_video_t *sh, int cmd, void *arg) if (ctx->vo_initialized) mpcodecs_reconfig_vo(sh, &ctx->image_params); return true; + case VDCTRL_GET_PARAMS: + *(struct mp_image_params *)arg = ctx->image_params; + return ctx->vo_initialized ? true : CONTROL_NA; } return CONTROL_UNKNOWN; } |