Re: [libav-devel] [PATCH] avconv_hw: Add implicit device creation with default parameters
On 30/04/17 14:56, wm4 wrote: > On Sun, 30 Apr 2017 14:19:02 +0100 > Mark Thompsonwrote: > >> 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), >> + ); >> +} >> } 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 libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] avconv_hw: Add implicit device creation with default parameters
On Sun, 30 Apr 2017 14:19:02 +0100 Mark Thompsonwrote: > 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), > + ); > +} > } else { > // No device required. > return 0; I think I've also tested this one confirmed working on Friday. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] avconv_hw: Add implicit device creation with default parameters
On 4/30/17 3:19 PM, Mark Thompson wrote: > This was intended to be the behaviour all along, but, as noted by > wm4, the implementation wasn't actually there. Seems fine. lu ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel