diff options
author | Aman Gupta <aman@tmm1.net> | 2017-12-04 04:32:22 +0300 |
---|---|---|
committer | Matthieu Bouron <matthieu.bouron@gmail.com> | 2017-12-16 02:52:27 +0300 |
commit | 8bf4e6d3ce25723832625dddbf1c06ab20ab5828 (patch) | |
tree | e63c80887ad5d8a0570ccdfefa1bb25bd13bc1a8 /libavcodec/mediacodecdec.c | |
parent | e4d9f05ca79909e2853834c8f80a52bc9cf0e6b6 (diff) |
lavc/mediacodec: use AVMediaCodecDeviceContext hw_device_ctx if set
Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Diffstat (limited to 'libavcodec/mediacodecdec.c')
-rw-r--r-- | libavcodec/mediacodecdec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/mediacodecdec.c b/libavcodec/mediacodecdec.c index 1b5ae4ad59..b698ceaef9 100644 --- a/libavcodec/mediacodecdec.c +++ b/libavcodec/mediacodecdec.c @@ -520,8 +520,9 @@ static const AVCodecHWConfigInternal *mediacodec_hw_configs[] = { &(const AVCodecHWConfigInternal) { .public = { .pix_fmt = AV_PIX_FMT_MEDIACODEC, - .methods = AV_CODEC_HW_CONFIG_METHOD_AD_HOC, - .device_type = AV_HWDEVICE_TYPE_NONE, + .methods = AV_CODEC_HW_CONFIG_METHOD_AD_HOC | + AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX, + .device_type = AV_HWDEVICE_TYPE_MEDIACODEC, }, .hwaccel = NULL, }, |