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
0e2573c8
Commit
0e2573c8
authored
Aug 31, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avio: return an error when file size is unknown
parent
68dcab3d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
modules/access/avio.c
modules/access/avio.c
+4
-3
No files found.
modules/access/avio.c
View file @
0e2573c8
...
...
@@ -82,7 +82,7 @@ static int UrlInterruptCallback(void *access)
struct
access_sys_t
{
AVIOContext
*
context
;
u
int64_t
size
;
int64_t
size
;
};
struct
sout_access_out_sys_t
{
...
...
@@ -193,7 +193,6 @@ int OpenAvio(vlc_object_t *object)
seekable
=
sys
->
context
->
seekable
;
#endif
msg_Dbg
(
access
,
"%sseekable, size=%"
PRIi64
,
seekable
?
""
:
"not "
,
size
);
sys
->
size
=
size
>
0
?
size
:
0
;
/* */
access_InitFields
(
access
);
...
...
@@ -373,7 +372,7 @@ static int Seek(access_t *access, uint64_t position)
if
(
ret
<
0
)
{
msg_Err
(
access
,
"Seek to %"
PRIu64
" failed: %s"
,
position
,
vlc_strerror_c
(
AVUNERROR
(
ret
)));
if
(
sys
->
size
==
0
||
position
!=
sys
->
size
)
if
(
sys
->
size
<
0
||
position
!=
sys
->
size
)
return
VLC_EGENERIC
;
}
access
->
info
.
i_pos
=
position
;
...
...
@@ -437,6 +436,8 @@ static int Control(access_t *access, int query, va_list args)
*
b
=
true
;
/* FIXME */
return
VLC_SUCCESS
;
case
ACCESS_GET_SIZE
:
if
(
sys
->
size
<
0
)
return
VLC_EGENERIC
;
*
va_arg
(
args
,
uint64_t
*
)
=
sys
->
size
;
return
VLC_SUCCESS
;
case
ACCESS_GET_PTS_DELAY
:
{
...
...
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