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
efe323f8
Commit
efe323f8
authored
Sep 02, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stream: STREAM_IS_DIRECTORY can actually fail, fix accordingly
parent
9c389564
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
12 deletions
+9
-12
include/vlc_stream.h
include/vlc_stream.h
+1
-1
modules/demux/playlist/directory.c
modules/demux/playlist/directory.c
+3
-7
modules/demux/playlist/playlist.h
modules/demux/playlist/playlist.h
+5
-4
No files found.
include/vlc_stream.h
View file @
efe323f8
...
...
@@ -83,7 +83,7 @@ enum stream_query_e
STREAM_CAN_CONTROL_PACE
,
/**< arg1= bool * res=cannot fail*/
/* */
STREAM_GET_SIZE
=
6
,
/**< arg1= uint64_t * res=can fail */
STREAM_IS_DIRECTORY
,
/**< arg1= bool *, arg2= bool *, arg3=bool *, res=can
not
fail*/
STREAM_IS_DIRECTORY
,
/**< arg1= bool *, arg2= bool *, arg3=bool *, res=can fail*/
/* */
STREAM_GET_PTS_DELAY
=
0x101
,
/**< arg1= int64_t* res=cannot fail */
...
...
modules/demux/playlist/directory.c
View file @
efe323f8
...
...
@@ -48,14 +48,10 @@ static int Demux( demux_t *p_demux );
int
Import_Dir
(
vlc_object_t
*
p_this
)
{
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
bool
b_is_dir
,
b_dir_sorted
,
b_dir_can_loop
;
bool
b_is_dir
=
false
;
bool
b_dir_sorted
=
false
;
bool
b_dir_can_loop
=
false
;
int
i_err
=
stream_Control
(
p_demux
->
s
,
STREAM_IS_DIRECTORY
,
&
b_is_dir
,
&
b_dir_sorted
,
&
b_dir_can_loop
);
if
(
!
(
i_err
==
VLC_SUCCESS
&&
b_is_dir
)
)
if
(
stream_Control
(
p_demux
->
s
,
STREAM_IS_DIRECTORY
,
&
b_is_dir
,
&
b_dir_sorted
,
&
b_dir_can_loop
)
||
!
b_is_dir
)
return
VLC_EGENERIC
;
STANDARD_DEMUX_INIT_MSG
(
"reading directory content"
);
...
...
modules/demux/playlist/playlist.h
View file @
efe323f8
...
...
@@ -82,10 +82,11 @@ extern input_item_t * GetCurrentItem(demux_t *p_demux);
bool
CheckContentType
(
stream_t
*
p_stream
,
const
char
*
psz_ctype
);
#define CHECK_FILE() do { \
bool b_is_dir = false; \
stream_Control( ((demux_t *)p_this)->s, STREAM_IS_DIRECTORY, &b_is_dir, NULL, NULL ); \
if( b_is_dir ) \
#define CHECK_FILE() \
do { \
bool b_is_dir; \
if( stream_Control( ((demux_t *)p_this)->s, STREAM_IS_DIRECTORY, \
&b_is_dir, NULL, NULL ) == VLC_SUCCESS && b_is_dir ) \
return VLC_EGENERIC; \
} while(0)
...
...
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