[vlc-devel] [PATCH] vaapi: fix profiles detection.
    Jean-Paul Saman 
    jpsaman at videolan.org
       
    Tue Dec  6 15:29:12 CET 2011
    
    
  
2011/12/6 Rémi Denis-Courmont <remi at remlab.net>:
> Le mardi 6 décembre 2011 16:16:14 Jean-Paul Saman, vous avez écrit :
>> > +    p_profiles_list = malloc( i_profiles_nb * sizeof( VAProfile ) );
>>
>> Use calloc() here: VAProfile *p_profiles_list = calloc( i_profiles_nb,
>> sizeof( VAProfile ) );
>
> Why bother the zero the memory here?
Cause vaMaxNumProfiles() is not guarenteed to fill it up. Although in
this patch it might not be necessary.
Kind regards
Jean-Paul Saman.
    
    
More information about the vlc-devel
mailing list