[vlc-devel] [PATCH 1/3] avcodec:video: don't try hardware acceleration if "none" is enabled

Rémi Denis-Courmont remi at remlab.net
Fri Aug 4 17:15:15 CEST 2017


Le 4 août 2017 17:35:50 GMT+03:00, Jean-Baptiste Kempf <jb at videolan.org> a écrit :
>Hello,
>
>On Fri, 4 Aug 2017, at 16:31, Rémi Denis-Courmont wrote:
>> Le 4 août 2017 15:54:55 GMT+03:00, Steve Lhomme <robux4 at videolabs.io>
>> a écrit :>> ---
>>> 
>>>  modules/codec/avcodec/video.c | 8 ++++++++
>>> 
>>>  1 file changed, 8 insertions(+)
>>> 
>>> 
>>> 
>>> diff --git a/modules/codec/avcodec/video.c
>>> b/modules/codec/avcodec/video.c
>>>>> index 590aa9460f..14668db0c4 100644
>>> 
>>> --- a/modules/codec/avcodec/video.c
>>> 
>>> +++ b/modules/codec/avcodec/video.c
>>> 
>>> @@ -1490,6 +1490,14 @@ static enum PixelFormat ffmpeg_GetFormat(
>>> AVCodecContext *p_context,
>>>>>              can_hwaccel = true;
>>> 
>>>      }
>>> 
>>>  
>>> 
>>> +    char * var = var_InheritString(p_dec, "avcodec-hw");
>>> 
>>> +    if (var == NULL || !strcmp( var, "none" ))
>>> 
>>> +    {
>>> 
>>> +        msg_Dbg( p_dec, "disable hardware decoders" );
>>> 
>>> +        can_hwaccel = false;
>>> 
>>> +    }
>>> 
>>> +    free(var);
>>> 
>>> +
>>> 
>>>      /* If the format did not actually change (e.g. seeking), try to
>>>      reuse the
>>>>>       * existing output format, and if present, hardware
>acceleration
>>>         back-end.
>>>>>       * This avoids resetting the pipeline downstream. This also
>>>         avoids
>>>> 
>> Hell no. We have had enough bugs with second-guessing the module
>> loader already.
>Then, how do you disable all hw decoding?
>
>--
>Jean-Baptiste Kempf -  President
>+33 672 704 734
> 

If you mean avcodec hwaccel, then there are infinitely many ways to enable or disable.
-- 
Rémi Denis-Courmont
Typed on an inconvenient virtual keyboard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170804/9d321a9a/attachment.html>


More information about the vlc-devel mailing list