L'octidi 8 thermidor, an CCXXV, Li, Zhong a écrit :
> It is similar to hw_device_match_type_in_name() in ffmpeg_hw.c:
>       if (strstr(codec_name, type_name))
>        return type;

I must say, I really do not like the idea of having an API example
making that terrible construct official.

If testing the hw device type is really absolutely necessary in the API,
then we need some kind of avcodec_get_hw_type() function to do that
cleanly, before considering the API usable and documenting it.

Testing the codec name in external code is a big no, testing part of it
for a three-letter substring even more so.

Regards,

-- 
  Nicolas George
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to