libavutil/hwcontext_qsv: fix a bug for mapping vaapi frame to qsv
authornyanmisaka <nst799610810@gmail.com>
Tue, 16 Nov 2021 08:16:22 +0000 (16:16 +0800)
committerAnton Khirnov <anton@khirnov.net>
Sat, 4 Dec 2021 13:06:30 +0000 (14:06 +0100)
commit64467cbca2d9d638348eaeaef13511999744cf7a
treee9b64450c54edf834dbbeae20dfb2f90a5576367
parentc6f4e10111debf5b547a399661a5fe997d761033
libavutil/hwcontext_qsv: fix a bug for mapping vaapi frame to qsv

The data stored in data[3] in VAAPI AVFrame is VASurfaceID while
the data stored in pair->first is the pointer of VASurfaceID, so
we need to do cast to make following commandline works:

ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 \
-hwaccel_output_format vaapi -i input.264 \
-vf "hwmap=derive_device=qsv,format=qsv" -c:v h264_qsv output.264

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavutil/hwcontext_qsv.c