summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-05-25 21:17:48 +0200
committerwm4 <wm4@nowhere>2015-05-25 21:43:20 +0200
commit449cdfc0ffc365b121136f5b93907a8f219fedb6 (patch)
tree4962095441d398fec5f6aec5849b4380e7721352
parent3fc3357d549e7bc633f6a196c0cb9e8aa5cbf87a (diff)
downloadmpv-449cdfc0ffc365b121136f5b93907a8f219fedb6.tar.bz2
mpv-449cdfc0ffc365b121136f5b93907a8f219fedb6.tar.xz
vd_lavc: report actually used hwdec API
Instead of the requested one, which can be just "auto", and which is rather useless.
-rw-r--r--video/decode/lavc.h1
-rw-r--r--video/decode/vd_lavc.c4
2 files changed, 1 insertions, 4 deletions
diff --git a/video/decode/lavc.h b/video/decode/lavc.h
index eaddd4abc2..b1fc39a191 100644
--- a/video/decode/lavc.h
+++ b/video/decode/lavc.h
@@ -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;
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index ca9ab9e5eb..b52898acb2 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -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;