[vlc-devel] [PATCH] vaapi: fix profiles detection.
Rémi Denis-Courmont
remi at remlab.net
Tue Dec 6 16:29:17 CET 2011
Le mardi 6 décembre 2011 16:29:12 Jean-Paul Saman, vous avez écrit :
> 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.
So what?
--
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis
More information about the vlc-devel
mailing list