Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
c1de0957
Commit
c1de0957
authored
Sep 02, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stream: disallow NULL parameters to STREAM_IS_DIRECTORY, simplify
parent
605b5cb8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
22 deletions
+8
-22
modules/access/archive/stream.c
modules/access/archive/stream.c
+3
-10
modules/demux/playlist/playlist.h
modules/demux/playlist/playlist.h
+3
-2
src/input/access.c
src/input/access.c
+2
-10
No files found.
modules/access/archive/stream.c
View file @
c1de0957
...
...
@@ -39,17 +39,10 @@ static int Control(stream_t *p_stream, int i_query, va_list args)
switch
(
i_query
)
{
case
STREAM_IS_DIRECTORY
:
{
bool
*
pb_canreaddir
=
va_arg
(
args
,
bool
*
);
bool
*
pb_dirsorted
=
va_arg
(
args
,
bool
*
);
bool
*
pb_dircanloop
=
va_arg
(
args
,
bool
*
);
*
pb_canreaddir
=
true
;
if
(
pb_dirsorted
)
*
pb_dirsorted
=
false
;
if
(
pb_dircanloop
)
pb_dircanloop
=
false
;
*
va_arg
(
args
,
bool
*
)
=
true
;
*
va_arg
(
args
,
bool
*
)
=
false
;
*
va_arg
(
args
,
bool
*
)
=
false
;
break
;
}
case
STREAM_CAN_SEEK
:
case
STREAM_CAN_FASTSEEK
:
...
...
modules/demux/playlist/playlist.h
View file @
c1de0957
...
...
@@ -84,9 +84,10 @@ bool CheckContentType( stream_t * p_stream, const char * psz_ctype );
#define CHECK_FILE() \
do { \
bool b_is_dir; \
bool b_is_dir
, b_sorted, b_loop
; \
if( stream_Control( ((demux_t *)p_this)->s, STREAM_IS_DIRECTORY, \
&b_is_dir, NULL, NULL ) == VLC_SUCCESS && b_is_dir ) \
&b_is_dir, &b_sorted, &b_loop ) == VLC_SUCCESS && \
b_is_dir ) \
return VLC_EGENERIC; \
} while(0)
...
...
src/input/access.c
View file @
c1de0957
...
...
@@ -311,18 +311,10 @@ static int AStreamControl(stream_t *s, int cmd, va_list args)
return
access_vaControl
(
access
,
cmd
,
args
);
case
STREAM_IS_DIRECTORY
:
{
bool
*
b
;
*
va_arg
(
args
,
bool
*
)
=
access
->
pf_readdir
!=
NULL
;
b
=
va_arg
(
args
,
bool
*
);
if
(
b
!=
NULL
)
*
b
=
access
->
info
.
b_dir_sorted
;
b
=
va_arg
(
args
,
bool
*
);
if
(
b
!=
NULL
)
*
b
=
access
->
info
.
b_dir_can_loop
;
*
va_arg
(
args
,
bool
*
)
=
access
->
info
.
b_dir_sorted
;
*
va_arg
(
args
,
bool
*
)
=
access
->
info
.
b_dir_can_loop
;
break
;
}
case
STREAM_GET_PRIVATE_BLOCK
:
{
...
...
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