[vlc-devel] [PATCH] omxil: remove dead code

Steve Lhomme robux4 at ycbcr.xyz
Fri Dec 4 07:52:34 CET 2020


On 2020-12-03 19:00, Rémi Denis-Courmont wrote:
> Le torstaina 3. joulukuuta 2020, 11.10.56 EET Steve Lhomme a écrit :
>> On 2020-12-03 10:09, Steve Lhomme wrote:
>>> It seems correct but the api.start callback doesn't seem to return clean
>>> values. The start callbacks from mediacodec_jni.c and mediacodec_ndk.c
>>> return 0 or MC_API_ERROR. They should return VLC_SUCCESS/VLC_Exxx values.
>>
>> In fact even StartMediaCodec() return 0 or MC_API_ERROR. So testing the
>> result against VLC_xxx values is just bogus.
> 
> It's distasteful and misleading, and I wouldn't have written it that way.
> But VLC_SUCCESS is zero, so it's not "bogus".

It's just as bogus as all the case 0 is used in place of VLC_SUCCESS. 
Leaving the reader to wonder what the test is about and having to look 
(deep) in the code to check what a return value is.


More information about the vlc-devel mailing list