Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
0f00164e
Commit
0f00164e
authored
Mar 12, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove useless test before a free().
parent
1e83ef82
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
37 additions
and
50 deletions
+37
-50
modules/video_filter/atmo/AtmoConfig.h
modules/video_filter/atmo/AtmoConfig.h
+1
-1
modules/video_filter/clone.c
modules/video_filter/clone.c
+2
-2
modules/video_filter/gradient.c
modules/video_filter/gradient.c
+2
-2
modules/video_filter/marq.c
modules/video_filter/marq.c
+3
-3
modules/video_filter/osdmenu.c
modules/video_filter/osdmenu.c
+4
-4
modules/video_filter/rss.c
modules/video_filter/rss.c
+8
-14
modules/video_output/directfb.c
modules/video_output/directfb.c
+2
-3
modules/video_output/ggi.c
modules/video_output/ggi.c
+1
-1
modules/video_output/msw/directx.c
modules/video_output/msw/directx.c
+7
-13
modules/video_output/msw/events.c
modules/video_output/msw/events.c
+1
-1
modules/video_output/opengl.c
modules/video_output/opengl.c
+3
-3
modules/video_output/x11/xcommon.c
modules/video_output/x11/xcommon.c
+3
-3
No files found.
modules/video_filter/atmo/AtmoConfig.h
View file @
0f00164e
...
@@ -138,7 +138,7 @@ class CAtmoConfig {
...
@@ -138,7 +138,7 @@ class CAtmoConfig {
#if defined(_ATMO_VLC_PLUGIN_)
#if defined(_ATMO_VLC_PLUGIN_)
char
*
getSerialDevice
()
{
return
m_devicename
;
}
char
*
getSerialDevice
()
{
return
m_devicename
;
}
void
setSerialDevice
(
char
*
newdevice
)
{
if
(
m_devicename
)
free
(
m_devicename
);
if
(
newdevice
)
m_devicename
=
strdup
(
newdevice
);
else
m_devicename
=
NULL
;
}
void
setSerialDevice
(
char
*
newdevice
)
{
free
(
m_devicename
);
if
(
newdevice
)
m_devicename
=
strdup
(
newdevice
);
else
m_devicename
=
NULL
;
}
#else
#else
int
getComport
()
{
return
m_Comport
;
}
int
getComport
()
{
return
m_Comport
;
}
void
setComport
(
int
value
)
{
m_Comport
=
value
;
}
void
setComport
(
int
value
)
{
m_Comport
=
value
;
}
...
...
modules/video_filter/clone.c
View file @
0f00164e
...
@@ -264,7 +264,7 @@ static int Init( vout_thread_t *p_vout )
...
@@ -264,7 +264,7 @@ static int Init( vout_thread_t *p_vout )
msg_Err
(
p_vout
,
"failed to clone %i vout threads"
,
msg_Err
(
p_vout
,
"failed to clone %i vout threads"
,
p_vout
->
p_sys
->
i_clones
);
p_vout
->
p_sys
->
i_clones
);
p_vout
->
p_sys
->
i_clones
=
i_vout
;
p_vout
->
p_sys
->
i_clones
=
i_vout
;
if
(
psz_default_vout
)
free
(
psz_default_vout
);
free
(
psz_default_vout
);
RemoveAllVout
(
p_vout
);
RemoveAllVout
(
p_vout
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
...
@@ -272,7 +272,7 @@ static int Init( vout_thread_t *p_vout )
...
@@ -272,7 +272,7 @@ static int Init( vout_thread_t *p_vout )
ADD_CALLBACKS
(
p_vout
->
p_sys
->
pp_vout
[
i_vout
],
SendEvents
);
ADD_CALLBACKS
(
p_vout
->
p_sys
->
pp_vout
[
i_vout
],
SendEvents
);
}
}
if
(
psz_default_vout
)
free
(
psz_default_vout
);
free
(
psz_default_vout
);
ALLOCATE_DIRECTBUFFERS
(
VOUT_MAX_PICTURES
);
ALLOCATE_DIRECTBUFFERS
(
VOUT_MAX_PICTURES
);
ADD_PARENT_CALLBACKS
(
SendEventsToChild
);
ADD_PARENT_CALLBACKS
(
SendEventsToChild
);
...
...
modules/video_filter/gradient.c
View file @
0f00164e
...
@@ -736,8 +736,8 @@ static void FilterHough( filter_t *p_filter, picture_t *p_inpic,
...
@@ -736,8 +736,8 @@ static void FilterHough( filter_t *p_filter, picture_t *p_inpic,
}
}
}
}
if
(
p_hough
)
free
(
p_hough
);
free
(
p_hough
);
if
(
p_smooth
)
free
(
p_smooth
);
free
(
p_smooth
);
}
}
#undef p_pre_hough
#undef p_pre_hough
...
...
modules/video_filter/marq.c
View file @
0f00164e
...
@@ -238,8 +238,8 @@ static void DestroyFilter( vlc_object_t *p_this )
...
@@ -238,8 +238,8 @@ static void DestroyFilter( vlc_object_t *p_this )
filter_t
*
p_filter
=
(
filter_t
*
)
p_this
;
filter_t
*
p_filter
=
(
filter_t
*
)
p_this
;
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
if
(
p_sys
->
p_style
)
free
(
p_sys
->
p_style
);
free
(
p_sys
->
p_style
);
if
(
p_sys
->
psz_marquee
)
free
(
p_sys
->
psz_marquee
);
free
(
p_sys
->
psz_marquee
);
/* Delete the marquee variables */
/* Delete the marquee variables */
#define DEL_VAR(var) \
#define DEL_VAR(var) \
...
@@ -341,7 +341,7 @@ static int MarqueeCallback( vlc_object_t *p_this, char const *psz_var,
...
@@ -341,7 +341,7 @@ static int MarqueeCallback( vlc_object_t *p_this, char const *psz_var,
if
(
!
strncmp
(
psz_var
,
"marq-marquee"
,
7
)
)
if
(
!
strncmp
(
psz_var
,
"marq-marquee"
,
7
)
)
{
{
if
(
p_sys
->
psz_marquee
)
free
(
p_sys
->
psz_marquee
);
free
(
p_sys
->
psz_marquee
);
p_sys
->
psz_marquee
=
strdup
(
newval
.
psz_string
);
p_sys
->
psz_marquee
=
strdup
(
newval
.
psz_string
);
}
}
else
if
(
!
strncmp
(
psz_var
,
"marq-x"
,
6
)
)
else
if
(
!
strncmp
(
psz_var
,
"marq-x"
,
6
)
)
...
...
modules/video_filter/osdmenu.c
View file @
0f00164e
...
@@ -281,8 +281,8 @@ error:
...
@@ -281,8 +281,8 @@ error:
osd_MenuDelete
(
p_this
,
p_sys
->
p_menu
);
osd_MenuDelete
(
p_this
,
p_sys
->
p_menu
);
p_sys
->
p_menu
=
NULL
;
p_sys
->
p_menu
=
NULL
;
if
(
p_sys
->
psz_file
)
free
(
p_sys
->
psz_file
);
free
(
p_sys
->
psz_file
);
if
(
p_sys
)
free
(
p_sys
);
free
(
p_sys
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
...
@@ -328,8 +328,8 @@ static void DestroyFilter( vlc_object_t *p_this )
...
@@ -328,8 +328,8 @@ static void DestroyFilter( vlc_object_t *p_this )
osd_MenuDelete
(
p_filter
,
p_sys
->
p_menu
);
osd_MenuDelete
(
p_filter
,
p_sys
->
p_menu
);
if
(
p_sys
->
psz_file
)
free
(
p_sys
->
psz_file
);
free
(
p_sys
->
psz_file
);
if
(
p_sys
)
free
(
p_sys
);
free
(
p_sys
);
}
}
/*****************************************************************************
/*****************************************************************************
...
...
modules/video_filter/rss.c
View file @
0f00164e
...
@@ -348,8 +348,8 @@ static void DestroyFilter( vlc_object_t *p_this )
...
@@ -348,8 +348,8 @@ static void DestroyFilter( vlc_object_t *p_this )
vlc_mutex_lock
(
&
p_sys
->
lock
);
vlc_mutex_lock
(
&
p_sys
->
lock
);
if
(
p_sys
->
p_style
)
free
(
p_sys
->
p_style
);
free
(
p_sys
->
p_style
);
if
(
p_sys
->
psz_marquee
)
free
(
p_sys
->
psz_marquee
);
free
(
p_sys
->
psz_marquee
);
free
(
p_sys
->
psz_urls
);
free
(
p_sys
->
psz_urls
);
FreeRSS
(
p_filter
);
FreeRSS
(
p_filter
);
vlc_mutex_unlock
(
&
p_sys
->
lock
);
vlc_mutex_unlock
(
&
p_sys
->
lock
);
...
@@ -740,11 +740,8 @@ static int FetchRSS( filter_t *p_filter)
...
@@ -740,11 +740,8 @@ static int FetchRSS( filter_t *p_filter)
return
1
;
return
1
;
case
XML_READER_STARTELEM
:
case
XML_READER_STARTELEM
:
if
(
psz_eltname
)
free
(
psz_eltname
);
{
psz_eltname
=
NULL
;
free
(
psz_eltname
);
psz_eltname
=
NULL
;
}
psz_eltname
=
xml_ReaderName
(
p_xml_reader
);
psz_eltname
=
xml_ReaderName
(
p_xml_reader
);
if
(
!
psz_eltname
)
if
(
!
psz_eltname
)
{
{
...
@@ -816,18 +813,15 @@ static int FetchRSS( filter_t *p_filter)
...
@@ -816,18 +813,15 @@ static int FetchRSS( filter_t *p_filter)
}
}
else
else
{
{
if
(
psz_href
)
free
(
psz_href
);
free
(
psz_href
);
}
}
if
(
psz_rel
)
free
(
psz_rel
);
free
(
psz_rel
);
}
}
break
;
break
;
case
XML_READER_ENDELEM
:
case
XML_READER_ENDELEM
:
if
(
psz_eltname
)
free
(
psz_eltname
);
{
psz_eltname
=
NULL
;
free
(
psz_eltname
);
psz_eltname
=
NULL
;
}
psz_eltname
=
xml_ReaderName
(
p_xml_reader
);
psz_eltname
=
xml_ReaderName
(
p_xml_reader
);
if
(
!
psz_eltname
)
if
(
!
psz_eltname
)
{
{
...
...
modules/video_output/directfb.c
View file @
0f00164e
...
@@ -255,8 +255,7 @@ static void End( vout_thread_t *p_vout )
...
@@ -255,8 +255,7 @@ static void End( vout_thread_t *p_vout )
{
{
vout_sys_t
*
p_sys
=
p_vout
->
p_sys
;
vout_sys_t
*
p_sys
=
p_vout
->
p_sys
;
if
(
p_sys
->
p_pixels
)
free
(
p_sys
->
p_pixels
);
free
(
p_sys
->
p_pixels
);
}
}
static
void
Destroy
(
vlc_object_t
*
p_this
)
static
void
Destroy
(
vlc_object_t
*
p_this
)
...
@@ -265,7 +264,7 @@ static void Destroy( vlc_object_t *p_this )
...
@@ -265,7 +264,7 @@ static void Destroy( vlc_object_t *p_this )
vout_sys_t
*
p_sys
=
p_vout
->
p_sys
;
vout_sys_t
*
p_sys
=
p_vout
->
p_sys
;
CloseDisplay
(
p_vout
);
CloseDisplay
(
p_vout
);
if
(
p_sys
)
free
(
p_sys
);
free
(
p_sys
);
p_sys
=
NULL
;
p_sys
=
NULL
;
}
}
...
...
modules/video_output/ggi.c
View file @
0f00164e
...
@@ -395,7 +395,7 @@ static int OpenDisplay( vout_thread_t *p_vout )
...
@@ -395,7 +395,7 @@ static int OpenDisplay( vout_thread_t *p_vout )
psz_display
=
config_GetPsz
(
p_vout
,
"ggi_display"
);
psz_display
=
config_GetPsz
(
p_vout
,
"ggi_display"
);
p_vout
->
p_sys
->
p_display
=
ggiOpen
(
psz_display
,
NULL
);
p_vout
->
p_sys
->
p_display
=
ggiOpen
(
psz_display
,
NULL
);
if
(
psz_display
)
free
(
psz_display
);
free
(
psz_display
);
if
(
p_vout
->
p_sys
->
p_display
==
NULL
)
if
(
p_vout
->
p_sys
->
p_display
==
NULL
)
{
{
...
...
modules/video_output/msw/directx.c
View file @
0f00164e
...
@@ -527,11 +527,8 @@ static void CloseVideo( vlc_object_t *p_this )
...
@@ -527,11 +527,8 @@ static void CloseVideo( vlc_object_t *p_this )
p_vout
->
p_sys
->
i_spi_screensavetimeout
,
NULL
,
0
);
p_vout
->
p_sys
->
i_spi_screensavetimeout
,
NULL
,
0
);
}
}
if
(
p_vout
->
p_sys
)
free
(
p_vout
->
p_sys
);
{
p_vout
->
p_sys
=
NULL
;
free
(
p_vout
->
p_sys
);
p_vout
->
p_sys
=
NULL
;
}
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -837,7 +834,7 @@ BOOL WINAPI DirectXEnumCallback( GUID* p_guid, LPTSTR psz_desc,
...
@@ -837,7 +834,7 @@ BOOL WINAPI DirectXEnumCallback( GUID* p_guid, LPTSTR psz_desc,
if
(
(
!
device
.
psz_string
||
!*
device
.
psz_string
)
&&
if
(
(
!
device
.
psz_string
||
!*
device
.
psz_string
)
&&
hmon
==
p_vout
->
p_sys
->
hmonitor
)
hmon
==
p_vout
->
p_sys
->
hmonitor
)
{
{
if
(
device
.
psz_string
)
free
(
device
.
psz_string
);
free
(
device
.
psz_string
);
}
}
else
if
(
strcmp
(
psz_drivername
,
device
.
psz_string
)
==
0
)
else
if
(
strcmp
(
psz_drivername
,
device
.
psz_string
)
==
0
)
{
{
...
@@ -863,11 +860,11 @@ BOOL WINAPI DirectXEnumCallback( GUID* p_guid, LPTSTR psz_desc,
...
@@ -863,11 +860,11 @@ BOOL WINAPI DirectXEnumCallback( GUID* p_guid, LPTSTR psz_desc,
}
}
p_vout
->
p_sys
->
hmonitor
=
hmon
;
p_vout
->
p_sys
->
hmonitor
=
hmon
;
if
(
device
.
psz_string
)
free
(
device
.
psz_string
);
free
(
device
.
psz_string
);
}
}
else
else
{
{
if
(
device
.
psz_string
)
free
(
device
.
psz_string
);
free
(
device
.
psz_string
);
return
TRUE
;
/* Keep enumerating */
return
TRUE
;
/* Keep enumerating */
}
}
...
@@ -1328,11 +1325,8 @@ static void DirectXCloseDDraw( vout_thread_t *p_vout )
...
@@ -1328,11 +1325,8 @@ static void DirectXCloseDDraw( vout_thread_t *p_vout )
p_vout
->
p_sys
->
hddraw_dll
=
NULL
;
p_vout
->
p_sys
->
hddraw_dll
=
NULL
;
}
}
if
(
p_vout
->
p_sys
->
p_display_driver
!=
NULL
)
free
(
p_vout
->
p_sys
->
p_display_driver
);
{
p_vout
->
p_sys
->
p_display_driver
=
NULL
;
free
(
p_vout
->
p_sys
->
p_display_driver
);
p_vout
->
p_sys
->
p_display_driver
=
NULL
;
}
p_vout
->
p_sys
->
hmonitor
=
NULL
;
p_vout
->
p_sys
->
hmonitor
=
NULL
;
}
}
...
...
modules/video_output/msw/events.c
View file @
0f00164e
...
@@ -316,7 +316,7 @@ void E_(EventThread)( event_thread_t *p_event )
...
@@ -316,7 +316,7 @@ void E_(EventThread)( event_thread_t *p_event )
var_Get
(
p_event
->
p_vout
,
"video-title"
,
&
val
);
var_Get
(
p_event
->
p_vout
,
"video-title"
,
&
val
);
if
(
!
val
.
psz_string
||
!*
val
.
psz_string
)
/* Default video title */
if
(
!
val
.
psz_string
||
!*
val
.
psz_string
)
/* Default video title */
{
{
if
(
val
.
psz_string
)
free
(
val
.
psz_string
);
free
(
val
.
psz_string
);
#ifdef MODULE_NAME_IS_wingdi
#ifdef MODULE_NAME_IS_wingdi
val
.
psz_string
=
strdup
(
VOUT_TITLE
" (WinGDI output)"
);
val
.
psz_string
=
strdup
(
VOUT_TITLE
" (WinGDI output)"
);
...
...
modules/video_output/opengl.c
View file @
0f00164e
...
@@ -495,7 +495,7 @@ static int Init( vout_thread_t *p_vout )
...
@@ -495,7 +495,7 @@ static int Init( vout_thread_t *p_vout )
p_sys
->
i_effect
=
OPENGL_EFFECT_NONE
;
p_sys
->
i_effect
=
OPENGL_EFFECT_NONE
;
#endif
#endif
}
}
if
(
val
.
psz_string
)
free
(
val
.
psz_string
);
free
(
val
.
psz_string
);
if
(
p_sys
->
i_effect
&
(
OPENGL_EFFECT_CUBE
|
if
(
p_sys
->
i_effect
&
(
OPENGL_EFFECT_CUBE
|
OPENGL_EFFECT_TRANSPARENT_CUBE
)
)
OPENGL_EFFECT_TRANSPARENT_CUBE
)
)
...
@@ -553,8 +553,8 @@ static void End( vout_thread_t *p_vout )
...
@@ -553,8 +553,8 @@ static void End( vout_thread_t *p_vout )
/* Free the texture buffer*/
/* Free the texture buffer*/
glDeleteTextures
(
2
,
p_sys
->
p_textures
);
glDeleteTextures
(
2
,
p_sys
->
p_textures
);
if
(
p_sys
->
pp_buffer
[
0
]
)
free
(
p_sys
->
pp_buffer
[
0
]
);
free
(
p_sys
->
pp_buffer
[
0
]
);
if
(
p_sys
->
pp_buffer
[
1
]
)
free
(
p_sys
->
pp_buffer
[
1
]
);
free
(
p_sys
->
pp_buffer
[
1
]
);
if
(
p_sys
->
p_vout
->
pf_unlock
)
if
(
p_sys
->
p_vout
->
pf_unlock
)
{
{
...
...
modules/video_output/x11/xcommon.c
View file @
0f00164e
...
@@ -224,10 +224,10 @@ int E_(Activate) ( vlc_object_t *p_this )
...
@@ -224,10 +224,10 @@ int E_(Activate) ( vlc_object_t *p_this )
msg_Err
(
p_vout
,
"cannot open display %s"
,
msg_Err
(
p_vout
,
"cannot open display %s"
,
XDisplayName
(
psz_display
)
);
XDisplayName
(
psz_display
)
);
free
(
p_vout
->
p_sys
);
free
(
p_vout
->
p_sys
);
if
(
psz_display
)
free
(
psz_display
);
free
(
psz_display
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
if
(
psz_display
)
free
(
psz_display
);
free
(
psz_display
);
/* Replace error handler so we can intercept some non-fatal errors */
/* Replace error handler so we can intercept some non-fatal errors */
XSetErrorHandler
(
X11ErrorHandler
);
XSetErrorHandler
(
X11ErrorHandler
);
...
@@ -1698,7 +1698,7 @@ static int CreateWindow( vout_thread_t *p_vout, x11_window_t *p_win )
...
@@ -1698,7 +1698,7 @@ static int CreateWindow( vout_thread_t *p_vout, x11_window_t *p_win )
XStoreName
(
p_vout
->
p_sys
->
p_display
,
XStoreName
(
p_vout
->
p_sys
->
p_display
,
p_win
->
base_window
,
val
.
psz_string
);
p_win
->
base_window
,
val
.
psz_string
);
}
}
if
(
val
.
psz_string
)
free
(
val
.
psz_string
);
free
(
val
.
psz_string
);
if
(
!
p_vout
->
b_fullscreen
)
if
(
!
p_vout
->
b_fullscreen
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment