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
40f3bf68
Commit
40f3bf68
authored
Aug 17, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix warning and potential memleak.
parent
14a2f2e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
modules/access/directory.c
modules/access/directory.c
+6
-2
No files found.
modules/access/directory.c
View file @
40f3bf68
...
@@ -189,6 +189,7 @@ static void Close( vlc_object_t * p_this )
...
@@ -189,6 +189,7 @@ static void Close( vlc_object_t * p_this )
*****************************************************************************/
*****************************************************************************/
static
ssize_t
ReadNull
(
access_t
*
p_access
,
uint8_t
*
p_buffer
,
size_t
i_len
)
static
ssize_t
ReadNull
(
access_t
*
p_access
,
uint8_t
*
p_buffer
,
size_t
i_len
)
{
{
(
void
)
p_access
;
/* Return fake data */
/* Return fake data */
memset
(
p_buffer
,
0
,
i_len
);
memset
(
p_buffer
,
0
,
i_len
);
return
i_len
;
return
i_len
;
...
@@ -201,7 +202,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len)
...
@@ -201,7 +202,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len)
{
{
char
*
psz
;
char
*
psz
;
int
i_mode
;
int
i_mode
;
char
*
psz_name
=
strdup
(
p_access
->
psz_path
);
char
*
psz_name
=
strdup
(
p_access
->
psz_path
);
if
(
psz_name
==
NULL
)
if
(
psz_name
==
NULL
)
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
...
@@ -216,6 +217,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len)
...
@@ -216,6 +217,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len)
if
(
!
p_input
)
if
(
!
p_input
)
{
{
msg_Err
(
p_access
,
"unable to find input (internal error)"
);
msg_Err
(
p_access
,
"unable to find input (internal error)"
);
free
(
psz_name
);
pl_Release
(
p_access
);
pl_Release
(
p_access
);
return
VLC_ENOOBJ
;
return
VLC_ENOOBJ
;
}
}
...
@@ -227,6 +229,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len)
...
@@ -227,6 +229,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len)
{
{
msg_Err
(
p_access
,
"unable to find item in playlist"
);
msg_Err
(
p_access
,
"unable to find item in playlist"
);
vlc_object_release
(
p_input
);
vlc_object_release
(
p_input
);
free
(
psz_name
);
pl_Release
(
p_access
);
pl_Release
(
p_access
);
return
VLC_ENOOBJ
;
return
VLC_ENOOBJ
;
}
}
...
@@ -340,6 +343,7 @@ static int DemuxOpen ( vlc_object_t *p_this )
...
@@ -340,6 +343,7 @@ static int DemuxOpen ( vlc_object_t *p_this )
*****************************************************************************/
*****************************************************************************/
static
int
Demux
(
demux_t
*
p_demux
)
static
int
Demux
(
demux_t
*
p_demux
)
{
{
(
void
)
p_demux
;
return
0
;
return
0
;
}
}
...
@@ -530,7 +534,7 @@ static int ReadDir( access_t *p_access, playlist_t *p_playlist,
...
@@ -530,7 +534,7 @@ static int ReadDir( access_t *p_access, playlist_t *p_playlist,
memmove
(
psz_uri
+
7
,
psz_uri
,
sizeof
(
psz_uri
)
-
7
);
memmove
(
psz_uri
+
7
,
psz_uri
,
sizeof
(
psz_uri
)
-
7
);
memcpy
(
psz_uri
,
"file://"
,
7
);
memcpy
(
psz_uri
,
"file://"
,
7
);
p_input
=
input_item_NewWithType
(
p_playlist
,
p_input
=
input_item_NewWithType
(
VLC_OBJECT
(
p_playlist
)
,
psz_uri
,
entry
,
0
,
NULL
,
psz_uri
,
entry
,
0
,
NULL
,
-
1
,
ITEM_TYPE_FILE
);
-
1
,
ITEM_TYPE_FILE
);
if
(
p_input
!=
NULL
)
if
(
p_input
!=
NULL
)
...
...
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