The hardware encoders currently do pick the first compatible device
available by themselves.
---
avtools/avconv_hw.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/avtools/avconv_hw.c b/avtools/avconv_hw.c
index 36ef866927..85fae91586 100644
--- a/avtools/avconv_hw.c
+++ b/avtools/avconv_hw.c
@@ -321,9 +321,11 @@ int hw_device_setup_for_encode(OutputStream *ost)
if (type != AV_HWDEVICE_TYPE_NONE) {
dev = hw_device_get_by_type(type);
if (!dev) {
- av_log(ost->enc_ctx, AV_LOG_WARNING, "No device available "
- "for encoder (device type %s for codec %s).\n",
- av_hwdevice_get_type_name(type), ost->enc->name);
+ if (hw_devices) {
+ av_log(ost->enc_ctx, AV_LOG_WARNING, "No device available "
+ "for encoder (device type %s for codec %s).\n",
+ av_hwdevice_get_type_name(type), ost->enc->name);
+ }
return 0;
}
ost->enc_ctx->hw_device_ctx = av_buffer_ref(dev->device_ref);
--
2.11.1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel