vd_lavc: report actually used hwdec API

Instead of the requested one, which can be just "auto", and which is
rather useless.
This commit is contained in:
wm4 2015-05-25 21:17:48 +02:00
parent 3fc3357d54
commit 449cdfc0ff
2 changed files with 1 additions and 4 deletions

View File

@ -15,7 +15,6 @@ typedef struct lavc_ctx {
AVCodecContext *avctx;
AVFrame *pic;
struct vd_lavc_hwdec *hwdec;
int selected_hwdec;
enum AVPixelFormat pix_fmt;
int best_csp;
enum AVDiscard skip_frame;

View File

@ -273,8 +273,6 @@ static int init(struct dec_video *vd, const char *decoder)
ctx->log = vd->log;
ctx->opts = vd->opts;
ctx->selected_hwdec = vd->opts->hwdec_api;
if (bstr_endswith0(bstr0(decoder), "_vdpau")) {
MP_WARN(vd, "VDPAU decoder '%s' was requested. "
"This way of enabling hardware\ndecoding is not supported "
@ -698,7 +696,7 @@ static int control(struct dec_video *vd, int cmd, void *arg)
*(int *)arg = delay;
return CONTROL_TRUE;
case VDCTRL_GET_HWDEC: {
int hwdec = ctx->selected_hwdec;
int hwdec = ctx->hwdec ? ctx->hwdec->type : 0;
if (!ctx->software_fallback_decoder)
hwdec = 0;
*(int *)arg = hwdec;