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
e58e4ccd
Commit
e58e4ccd
authored
Oct 06, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use NULL instead of 0 for pointers.
parent
7d7a42b8
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
17 deletions
+17
-17
modules/access/rtsp/access.c
modules/access/rtsp/access.c
+4
-4
modules/access/smb.c
modules/access/smb.c
+4
-4
modules/codec/dvbsub.c
modules/codec/dvbsub.c
+1
-1
modules/demux/playlist/dvb.c
modules/demux/playlist/dvb.c
+5
-5
modules/misc/rtsp.c
modules/misc/rtsp.c
+3
-3
No files found.
modules/access/rtsp/access.c
View file @
e58e4ccd
...
@@ -179,7 +179,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -179,7 +179,7 @@ static int Open( vlc_object_t *p_this )
p_access
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
access_sys_t
)
);
p_access
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
access_sys_t
)
);
p_sys
->
p_rtsp
=
malloc
(
sizeof
(
rtsp_client_t
)
);
p_sys
->
p_rtsp
=
malloc
(
sizeof
(
rtsp_client_t
)
);
p_sys
->
p_header
=
0
;
p_sys
->
p_header
=
NULL
;
p_sys
->
p_rtsp
->
p_userdata
=
p_access
;
p_sys
->
p_rtsp
->
p_userdata
=
p_access
;
p_sys
->
p_rtsp
->
pf_connect
=
RtspConnect
;
p_sys
->
p_rtsp
->
pf_connect
=
RtspConnect
;
p_sys
->
p_rtsp
->
pf_disconnect
=
RtspDisconnect
;
p_sys
->
p_rtsp
->
pf_disconnect
=
RtspDisconnect
;
...
@@ -192,7 +192,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -192,7 +192,7 @@ static int Open( vlc_object_t *p_this )
{
{
msg_Dbg
(
p_access
,
"could not connect to: %s"
,
p_access
->
psz_path
);
msg_Dbg
(
p_access
,
"could not connect to: %s"
,
p_access
->
psz_path
);
free
(
p_sys
->
p_rtsp
);
free
(
p_sys
->
p_rtsp
);
p_sys
->
p_rtsp
=
0
;
p_sys
->
p_rtsp
=
NULL
;
goto
error
;
goto
error
;
}
}
...
@@ -284,12 +284,12 @@ static block_t *BlockRead( access_t *p_access )
...
@@ -284,12 +284,12 @@ static block_t *BlockRead( access_t *p_access )
if
(
p_sys
->
p_header
)
if
(
p_sys
->
p_header
)
{
{
p_block
=
p_sys
->
p_header
;
p_block
=
p_sys
->
p_header
;
p_sys
->
p_header
=
0
;
p_sys
->
p_header
=
NULL
;
return
p_block
;
return
p_block
;
}
}
i_size
=
real_get_rdt_chunk_header
(
p_access
->
p_sys
->
p_rtsp
,
&
pheader
);
i_size
=
real_get_rdt_chunk_header
(
p_access
->
p_sys
->
p_rtsp
,
&
pheader
);
if
(
i_size
<=
0
)
return
0
;
if
(
i_size
<=
0
)
return
NULL
;
p_block
=
block_New
(
p_access
,
i_size
);
p_block
=
block_New
(
p_access
,
i_size
);
p_block
->
i_buffer
=
real_get_rdt_chunk
(
p_access
->
p_sys
->
p_rtsp
,
&
pheader
,
p_block
->
i_buffer
=
real_get_rdt_chunk
(
p_access
->
p_sys
->
p_rtsp
,
&
pheader
,
...
...
modules/access/smb.c
View file @
e58e4ccd
...
@@ -129,7 +129,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -129,7 +129,7 @@ static int Open( vlc_object_t *p_this )
access_sys_t
*
p_sys
;
access_sys_t
*
p_sys
;
struct
stat
filestat
;
struct
stat
filestat
;
char
*
psz_path
,
*
psz_uri
;
char
*
psz_path
,
*
psz_uri
;
char
*
psz_user
=
0
,
*
psz_pwd
=
0
,
*
psz_domain
=
0
;
char
*
psz_user
=
NULL
,
*
psz_pwd
=
NULL
,
*
psz_domain
=
NULL
;
int
i_ret
;
int
i_ret
;
#ifdef USE_CTX
#ifdef USE_CTX
...
@@ -189,11 +189,11 @@ static int Open( vlc_object_t *p_this )
...
@@ -189,11 +189,11 @@ static int Open( vlc_object_t *p_this )
* smb://[[[domain;]user[:password@]]server[/share[/path[/file]]]] */
* smb://[[[domain;]user[:password@]]server[/share[/path[/file]]]] */
if
(
!
psz_user
)
psz_user
=
var_CreateGetString
(
p_access
,
"smb-user"
);
if
(
!
psz_user
)
psz_user
=
var_CreateGetString
(
p_access
,
"smb-user"
);
if
(
psz_user
&&
!*
psz_user
)
{
free
(
psz_user
);
psz_user
=
0
;
}
if
(
psz_user
&&
!*
psz_user
)
{
free
(
psz_user
);
psz_user
=
NULL
;
}
if
(
!
psz_pwd
)
psz_pwd
=
var_CreateGetString
(
p_access
,
"smb-pwd"
);
if
(
!
psz_pwd
)
psz_pwd
=
var_CreateGetString
(
p_access
,
"smb-pwd"
);
if
(
psz_pwd
&&
!*
psz_pwd
)
{
free
(
psz_pwd
);
psz_pwd
=
0
;
}
if
(
psz_pwd
&&
!*
psz_pwd
)
{
free
(
psz_pwd
);
psz_pwd
=
NULL
;
}
if
(
!
psz_domain
)
psz_domain
=
var_CreateGetString
(
p_access
,
"smb-domain"
);
if
(
!
psz_domain
)
psz_domain
=
var_CreateGetString
(
p_access
,
"smb-domain"
);
if
(
psz_domain
&&
!*
psz_domain
)
{
free
(
psz_domain
);
psz_domain
=
0
;
}
if
(
psz_domain
&&
!*
psz_domain
)
{
free
(
psz_domain
);
psz_domain
=
NULL
;
}
#ifdef WIN32
#ifdef WIN32
if
(
psz_user
)
if
(
psz_user
)
...
...
modules/codec/dvbsub.c
View file @
e58e4ccd
...
@@ -932,7 +932,7 @@ static void decode_region_composition( decoder_t *p_dec, bs_t *s )
...
@@ -932,7 +932,7 @@ static void decode_region_composition( decoder_t *p_dec, bs_t *s )
p_obj
->
i_x
=
bs_read
(
s
,
12
);
p_obj
->
i_x
=
bs_read
(
s
,
12
);
bs_skip
(
s
,
4
);
/* Reserved */
bs_skip
(
s
,
4
);
/* Reserved */
p_obj
->
i_y
=
bs_read
(
s
,
12
);
p_obj
->
i_y
=
bs_read
(
s
,
12
);
p_obj
->
psz_text
=
0
;
p_obj
->
psz_text
=
NULL
;
i_processed_length
+=
6
;
i_processed_length
+=
6
;
...
...
modules/demux/playlist/dvb.c
View file @
e58e4ccd
...
@@ -193,13 +193,13 @@ static const struct
...
@@ -193,13 +193,13 @@ static const struct
static
int
ParseLine
(
char
*
psz_line
,
char
**
ppsz_name
,
static
int
ParseLine
(
char
*
psz_line
,
char
**
ppsz_name
,
char
***
pppsz_options
,
int
*
pi_options
)
char
***
pppsz_options
,
int
*
pi_options
)
{
{
char
*
psz_name
=
0
,
*
psz_parse
=
psz_line
;
char
*
psz_name
=
NULL
,
*
psz_parse
=
psz_line
;
int
i_count
=
0
,
i_program
=
0
,
i_frequency
=
0
;
int
i_count
=
0
,
i_program
=
0
,
i_frequency
=
0
;
bool
b_valid
=
false
;
bool
b_valid
=
false
;
if
(
pppsz_options
)
*
pppsz_options
=
0
;
if
(
pppsz_options
)
*
pppsz_options
=
NULL
;
if
(
pi_options
)
*
pi_options
=
0
;
if
(
pi_options
)
*
pi_options
=
0
;
if
(
ppsz_name
)
*
ppsz_name
=
0
;
if
(
ppsz_name
)
*
ppsz_name
=
NULL
;
/* Skip leading tabs and spaces */
/* Skip leading tabs and spaces */
while
(
*
psz_parse
==
' '
||
*
psz_parse
==
'\t'
||
while
(
*
psz_parse
==
' '
||
*
psz_parse
==
'\t'
||
...
@@ -210,7 +210,7 @@ static int ParseLine( char *psz_line, char **ppsz_name,
...
@@ -210,7 +210,7 @@ static int ParseLine( char *psz_line, char **ppsz_name,
while
(
psz_parse
)
while
(
psz_parse
)
{
{
const
char
*
psz_option
=
0
;
const
char
*
psz_option
=
NULL
;
char
*
psz_end
=
strchr
(
psz_parse
,
':'
);
char
*
psz_end
=
strchr
(
psz_parse
,
':'
);
if
(
psz_end
)
{
*
psz_end
=
0
;
psz_end
++
;
}
if
(
psz_end
)
{
*
psz_end
=
0
;
psz_end
++
;
}
...
@@ -281,7 +281,7 @@ static int ParseLine( char *psz_line, char **ppsz_name,
...
@@ -281,7 +281,7 @@ static int ParseLine( char *psz_line, char **ppsz_name,
/* This isn't a valid channels file, cleanup everything */
/* This isn't a valid channels file, cleanup everything */
while
(
(
*
pi_options
)
--
)
free
(
(
*
pppsz_options
)[
*
pi_options
]
);
while
(
(
*
pi_options
)
--
)
free
(
(
*
pppsz_options
)[
*
pi_options
]
);
free
(
*
pppsz_options
);
free
(
*
pppsz_options
);
*
pppsz_options
=
0
;
*
pi_options
=
0
;
*
pppsz_options
=
NULL
;
*
pi_options
=
0
;
}
}
if
(
i_program
&&
pppsz_options
&&
pi_options
)
if
(
i_program
&&
pppsz_options
&&
pi_options
)
...
...
modules/misc/rtsp.c
View file @
e58e4ccd
...
@@ -260,8 +260,8 @@ static void sprintf_hexa( char *s, uint8_t *p_data, int i_data )
...
@@ -260,8 +260,8 @@ static void sprintf_hexa( char *s, uint8_t *p_data, int i_data )
static
int
Open
(
vlc_object_t
*
p_this
)
static
int
Open
(
vlc_object_t
*
p_this
)
{
{
vod_t
*
p_vod
=
(
vod_t
*
)
p_this
;
vod_t
*
p_vod
=
(
vod_t
*
)
p_this
;
vod_sys_t
*
p_sys
=
0
;
vod_sys_t
*
p_sys
=
NULL
;
char
*
psz_url
=
0
;
char
*
psz_url
=
NULL
;
vlc_url_t
url
;
vlc_url_t
url
;
psz_url
=
config_GetPsz
(
p_vod
,
"rtsp-host"
);
psz_url
=
config_GetPsz
(
p_vod
,
"rtsp-host"
);
...
@@ -378,7 +378,7 @@ static vod_media_t *MediaNew( vod_t *p_vod, const char *psz_name,
...
@@ -378,7 +378,7 @@ static vod_media_t *MediaNew( vod_t *p_vod, const char *psz_name,
memset
(
p_media
,
0
,
sizeof
(
vod_media_t
)
);
memset
(
p_media
,
0
,
sizeof
(
vod_media_t
)
);
p_media
->
id
=
p_sys
->
i_media_id
++
;
p_media
->
id
=
p_sys
->
i_media_id
++
;
TAB_INIT
(
p_media
->
i_es
,
p_media
->
es
);
TAB_INIT
(
p_media
->
i_es
,
p_media
->
es
);
p_media
->
psz_mux
=
0
;
p_media
->
psz_mux
=
NULL
;
TAB_INIT
(
p_media
->
i_rtsp
,
p_media
->
rtsp
);
TAB_INIT
(
p_media
->
i_rtsp
,
p_media
->
rtsp
);
p_media
->
b_raw
=
false
;
p_media
->
b_raw
=
false
;
...
...
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