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
d1ed9f95
Commit
d1ed9f95
authored
Aug 31, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imem-access: return an error when file size is unknown
parent
1d96a2e7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
include/vlc/libvlc_media.h
include/vlc/libvlc_media.h
+1
-1
modules/access/imem-access.c
modules/access/imem-access.c
+4
-1
No files found.
include/vlc/libvlc_media.h
View file @
d1ed9f95
...
...
@@ -276,7 +276,7 @@ typedef enum libvlc_media_parse_flag_t
*
* \param opaque private pointer as passed to libvlc_media_new_callbacks()
* \param datap storage space for a private data pointer [OUT]
* \param sizep byte length of the bitstream or
0
if unknown [OUT]
* \param sizep byte length of the bitstream or
UINT64_MAX
if unknown [OUT]
*
* \note For convenience, *datap is initially NULL and *sizep is initially 0.
*
...
...
modules/access/imem-access.c
View file @
d1ed9f95
...
...
@@ -22,6 +22,7 @@
# include "config.h"
#endif
#include <assert.h>
#include <stdint.h>
#include <vlc_common.h>
#include <vlc_access.h>
...
...
@@ -89,6 +90,8 @@ static int Control(access_t *access, int query, va_list args)
break
;
case
ACCESS_GET_SIZE
:
if
(
sys
->
size
==
UINT64_MAX
)
return
VLC_EGENERIC
;
*
va_arg
(
args
,
uint64_t
*
)
=
sys
->
size
;
break
;
...
...
@@ -130,7 +133,7 @@ static int Open(vlc_object_t *object)
sys
->
read_cb
=
var_InheritAddress
(
access
,
"imem-read"
);
sys
->
seek_cb
=
var_InheritAddress
(
access
,
"imem-seek"
);
sys
->
close_cb
=
var_InheritAddress
(
access
,
"imem-close"
);
sys
->
size
=
0
;
sys
->
size
=
UINT64_MAX
;
if
(
open_cb
==
NULL
)
open_cb
=
open_cb_default
;
...
...
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