On 30/04/17 14:56, wm4 wrote:
> On Sun, 30 Apr 2017 14:19:02 +0100
> Mark Thompson <[email protected]> wrote:
> 
>> 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.
>> ---
>> This was intended to be the behaviour all along, but, as noted by wm4, the 
>> implementation wasn't actually there.
>>
>> The return value is not checked, because we only care about the dev argument 
>> which is set on success.
>>
>>
>>  avtools/avconv_hw.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/avtools/avconv_hw.c b/avtools/avconv_hw.c
>> index fd1618389..94be72330 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;
> 
> I think I've also tested this one confirmed working on Friday.

Yep, it's the same one.  I'll push it soon.

Thanks,

- Mark
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to