• Haihao Xiang's avatar
    ffmpeg_hw: make hardware selection for filters more user friendly · 6803d8b4
    Haihao Xiang authored
    When a device is derived from a source device, there are at least 2
    devices, and usually the derived device is the expected device, so let's
    pick the last device if user doesn't specify the filter device with
    filter_hw_device option
    
    After applying this patch, the command below can work:
    
    $> ffmpeg -init_hw_device vaapi=va:/dev/dri/renderD128 -init_hw_device
    qsv=hw@va -f lavfi -i yuvtestsrc  -vf
    format=nv12,hwupload=extra_hw_frames=64 -c:v h264_qsv -y out.h264
    Reviewed-by: 's avatarSoft Works <softworkz@hotmail.com>
    Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
    6803d8b4
ffmpeg_hw.c 16.9 KB