[vlc-devel] [vlc-commits] mac plugin: remove useless statics

Hugo Beauzée-Luyssen hugo at beauzee.fr
Fri Feb 6 17:03:06 CET 2015


On Fri, Feb 6, 2015, at 04:12 PM, Felix Paul Kühne wrote:
> npapi-vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> |
> Fri Feb  6 16:11:32 2015 +0100|
> [f69317447c7ac309f02416c774cabcd58578a1af] | committer: Felix Paul Kühne
> 
> mac plugin: remove useless statics
> 
> > http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=f69317447c7ac309f02416c774cabcd58578a1af
> ---
> 
>  npapi/vlcplugin_mac.mm |   18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/npapi/vlcplugin_mac.mm b/npapi/vlcplugin_mac.mm
> index 8886c2c..5481fa7 100644
> --- a/npapi/vlcplugin_mac.mm
> +++ b/npapi/vlcplugin_mac.mm
> @@ -134,15 +134,15 @@
>  - (CGDirectDisplayID)displayID;
>  @end
>  
> -static VLCBrowserRootLayer * browserRootLayer;
> -static VLCPlaybackLayer * playbackLayer;
> -static VLCNoMediaLayer * noMediaLayer;
> -static VLCControllerLayer * controllerLayer;
> -static VLCFullscreenWindow * fullscreenWindow;
> -static VLCFullscreenContentView * fullscreenView;
> -static CGImageRef createImageNamed(NSString *);
> -
> -static CGImageRef createImageNamed(NSString *name)
> +VLCBrowserRootLayer * browserRootLayer;
> +VLCPlaybackLayer * playbackLayer;
> +VLCNoMediaLayer * noMediaLayer;
> +VLCControllerLayer * controllerLayer;
> +VLCFullscreenWindow * fullscreenWindow;
> +VLCFullscreenContentView * fullscreenView;
> +CGImageRef createImageNamed(NSString *);
> +
> +CGImageRef createImageNamed(NSString *name)
>  {
>      CFURLRef url =
>      CFBundleCopyResourceURL(CFBundleGetBundleWithIdentifier(CFSTR("org.videolan.vlc-npapi-plugin")),
>      (CFStringRef)name, CFSTR("png"), NULL);
>  
> 

Hi,

Shouldn't you initialize those to NULL now? I haven't checked for all,
but it seems playbackLayer might be used uninitialized.

Regards,

-- 
  Hugo Beauzée-Luyssen
  hugo at beauzee.fr



More information about the vlc-devel mailing list