[vlc-devel] [PATCH 1/6] Freeze: Freeze interactive video filter
Jean-Baptiste Kempf
jb at videolan.org
Thu Jul 25 13:37:34 CEST 2013
On 25 Jul, Vianney Boyer wrote :
> modules/video_filter/freeze.c | 402
> ++++++++++++++++++++++++++++++++++++++++++
> modules/video_filter/freeze.h | 49 +++++
Why do you need a .h here?
> + /* Allocate structure */
> + p_filter->p_sys = p_sys = calloc(1, sizeof( *p_sys ) );
> + if( !p_sys )
unlikely()
> + for (int32_t i_p=0; i_p < p_sys->i_planes; i_p++)
Please use spaces around = signs.
And the style does not match the previous one.
> + p_sys->i_height = calloc( p_sys->i_planes, sizeof(*p_sys->i_height) );
> + p_sys->i_width = calloc( p_sys->i_planes, sizeof(*p_sys->i_width) );
> + p_sys->i_visible_pitch
> + = calloc( p_sys->i_planes,
> sizeof(*p_sys->i_visible_pitch) );
Those calloc are confusing.
> + if (p_sys->i_height) FREENULL( p_sys->i_height );
> + if (p_sys->i_width) FREENULL( p_sys->i_width );
> + if (p_sys->i_visible_pitch) FREENULL( p_sys->i_visible_pitch );
free(NULL) is OK in VLC.
Best regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
More information about the vlc-devel
mailing list