mirror of https://github.com/mpv-player/mpv
vd_lavc: don't request native pixfmt with -copy and METHOD_INTERNAL
If the codec uses AV_CODEC_HW_CONFIG_METHOD_INTERNAL, and we're using the -copy method, then don't request the native pix_fmt. It might not have a AVFrame.hw_frames_ctx set, and we couldn't read back at all. On top of that, most of those decoders probably don't provide read-back when using such opaque formats anyway, while providing separate decoding modes to decode to RAM.
This commit is contained in:
parent
1d92a804d2
commit
ca29a5aa9b
|
@ -352,6 +352,7 @@ static void add_all_hwdec_methods(struct hwdec_info **infos, int *num_infos)
|
|||
|
||||
// Copy variant.
|
||||
info.copying = true;
|
||||
info.pix_fmt = AV_PIX_FMT_NONE; // trust it can do sw output
|
||||
add_hwdec_item(infos, num_infos, info);
|
||||
|
||||
found_any = true;
|
||||
|
|
Loading…
Reference in New Issue