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
da2a50ad
Commit
da2a50ad
authored
Aug 26, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
access: add missing s->pf_read callback for directories
parent
1352643a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
4 deletions
+24
-4
src/input/access.c
src/input/access.c
+24
-4
No files found.
src/input/access.c
View file @
da2a50ad
...
@@ -149,6 +149,18 @@ struct stream_sys_t
...
@@ -149,6 +149,18 @@ struct stream_sys_t
block_t
*
block
;
block_t
*
block
;
};
};
static
ssize_t
AStreamNoRead
(
stream_t
*
s
,
void
*
buf
,
size_t
len
)
{
(
void
)
s
;
(
void
)
buf
;
(
void
)
len
;
return
-
1
;
}
static
input_item_t
*
AStreamNoReadDir
(
stream_t
*
s
)
{
(
void
)
s
;
return
NULL
;
}
/* Block access */
/* Block access */
static
ssize_t
AStreamReadBlock
(
stream_t
*
s
,
void
*
buf
,
size_t
len
)
static
ssize_t
AStreamReadBlock
(
stream_t
*
s
,
void
*
buf
,
size_t
len
)
{
{
...
@@ -232,8 +244,6 @@ static input_item_t *AStreamReadDir(stream_t *s)
...
@@ -232,8 +244,6 @@ static input_item_t *AStreamReadDir(stream_t *s)
{
{
stream_sys_t
*
sys
=
s
->
p_sys
;
stream_sys_t
*
sys
=
s
->
p_sys
;
if
(
sys
->
access
->
pf_readdir
==
NULL
)
return
NULL
;
return
sys
->
access
->
pf_readdir
(
sys
->
access
);
return
sys
->
access
->
pf_readdir
(
sys
->
access
);
}
}
...
@@ -375,7 +385,7 @@ stream_t *stream_AccessNew(vlc_object_t *parent, input_thread_t *input,
...
@@ -375,7 +385,7 @@ stream_t *stream_AccessNew(vlc_object_t *parent, input_thread_t *input,
sys
->
block
=
NULL
;
sys
->
block
=
NULL
;
const
char
*
cachename
=
NULL
;
const
char
*
cachename
;
if
(
sys
->
access
->
pf_block
!=
NULL
)
if
(
sys
->
access
->
pf_block
!=
NULL
)
{
{
...
@@ -388,7 +398,17 @@ stream_t *stream_AccessNew(vlc_object_t *parent, input_thread_t *input,
...
@@ -388,7 +398,17 @@ stream_t *stream_AccessNew(vlc_object_t *parent, input_thread_t *input,
s
->
pf_read
=
AStreamReadStream
;
s
->
pf_read
=
AStreamReadStream
;
cachename
=
"cache_read"
;
cachename
=
"cache_read"
;
}
}
else
{
s
->
pf_read
=
AStreamNoRead
;
cachename
=
NULL
;
}
if
(
sys
->
access
->
pf_readdir
!=
NULL
)
s
->
pf_readdir
=
AStreamReadDir
;
s
->
pf_readdir
=
AStreamReadDir
;
else
s
->
pf_readdir
=
AStreamNoReadDir
;
s
->
pf_control
=
AStreamControl
;
s
->
pf_control
=
AStreamControl
;
s
->
pf_destroy
=
AStreamDestroy
;
s
->
pf_destroy
=
AStreamDestroy
;
s
->
p_sys
=
sys
;
s
->
p_sys
=
sys
;
...
...
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