[FFmpeg-cvslog] avconv_hw: Add implicit device creation with default parameters

Mark Thompson git at videolan.org
Mon Oct 30 23:02:16 EET 2017


ffmpeg | branch: master | Mark Thompson <sw at jkqxz.net> | Sun Apr 30 14:11:51 2017 +0100| [9203aac22874c7259e155b7d00f1f33bb1355129] | committer: Mark Thompson

avconv_hw: Add implicit device creation with default parameters

If -hwaccel foo is supplied without any other device options, and the
foo hwaccel is meant to have a device, try to make such a device with
default parameters for the hwaccel to use.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9203aac22874c7259e155b7d00f1f33bb1355129
---

 avtools/avconv_hw.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/avtools/avconv_hw.c b/avtools/avconv_hw.c
index fd1618389b..94be723304 100644
--- a/avtools/avconv_hw.c
+++ b/avtools/avconv_hw.c
@@ -287,6 +287,10 @@ int hw_device_setup_for_decode(InputStream *ist)
             type = hw_device_match_type_in_name(ist->dec->name);
         if (type != AV_HWDEVICE_TYPE_NONE) {
             dev = hw_device_get_by_type(type);
+            if (!dev) {
+                hw_device_init_from_string(av_hwdevice_get_type_name(type),
+                                           &dev);
+            }
         } else {
             // No device required.
             return 0;



More information about the ffmpeg-cvslog mailing list