Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
eb2ec28e
Commit
eb2ec28e
authored
Sep 30, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code factorization
parent
aee89ad0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
18 deletions
+9
-18
modules/access/file.c
modules/access/file.c
+9
-18
No files found.
modules/access/file.c
View file @
eb2ec28e
...
...
@@ -206,33 +206,24 @@ static void Close (vlc_object_t * p_this)
free
(
p_sys
);
}
#include <vlc_network.h>
/*****************************************************************************
* Read: standard read on a file descriptor.
*****************************************************************************/
static
ssize_t
Read
(
access_t
*
p_access
,
uint8_t
*
p_buffer
,
size_t
i_len
)
{
access_sys_t
*
p_sys
=
p_access
->
p_sys
;
ssize_t
i_ret
;
int
fd
=
p_sys
->
fd
;
ssize_t
i_ret
;
#if !defined(WIN32) && !defined(UNDER_CE)
if
(
!
p_sys
->
b_seekable
)
{
/* Note that POSIX regular files (b_seekable) opened for read are
* guaranteed to always set POLLIN immediately, so we can spare
* poll()ing them. */
/* Wait until some data is available. Impossible on Windows. */
struct
pollfd
ufd
[
2
]
=
{
{
.
fd
=
fd
,
.
events
=
POLLIN
,
},
{
.
fd
=
vlc_object_waitpipe
(
p_access
),
.
events
=
POLLIN
,
},
};
if
(
poll
(
ufd
,
2
,
-
1
)
<
0
||
ufd
[
1
].
revents
)
return
-
1
;
}
#endif
/* WIN32 || UNDER_CE */
#ifndef WIN32
i_ret
=
net_Read
(
p_access
,
fd
,
NULL
,
p_buffer
,
i_len
,
false
);
#else
i_ret
=
read
(
fd
,
p_buffer
,
i_len
);
#endif
if
(
i_ret
<
0
)
{
switch
(
errno
)
...
...
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