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
2190e566
Commit
2190e566
authored
May 26, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: mp4: add stream_Tell helper
signedness problems due to error handling
parent
b1702cbd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+20
-2
No files found.
modules/demux/mp4/mp4.c
View file @
2190e566
...
...
@@ -149,6 +149,18 @@ static uint32_t stream_ReadU32( stream_t *s, void *p_read, uint32_t i_toread )
return
i_return
;
}
static
bool
MP4_stream_Tell
(
stream_t
*
s
,
uint64_t
*
pi_pos
)
{
int64_t
i_pos
=
stream_Tell
(
s
);
if
(
i_pos
<
0
)
return
false
;
else
{
*
pi_pos
=
(
uint64_t
)
i_pos
;
return
true
;
}
}
static
MP4_Box_t
*
MP4_GetTrexByTrackID
(
MP4_Box_t
*
p_moov
,
const
uint32_t
i_id
)
{
MP4_Box_t
*
p_trex
=
MP4_BoxGet
(
p_moov
,
"mvex/trex"
);
...
...
@@ -850,9 +862,13 @@ static int Demux( demux_t *p_demux )
{
block_t
*
p_block
;
int64_t
i_delta
;
uint64_t
i_current_pos
;
/* go,go go ! */
if
(
stream_Tell
(
p_demux
->
s
)
!=
i_candidate_pos
)
if
(
!
MP4_stream_Tell
(
p_demux
->
s
,
&
i_current_pos
)
)
goto
end
;
if
(
i_current_pos
!=
i_candidate_pos
)
{
if
(
stream_Seek
(
p_demux
->
s
,
i_candidate_pos
)
)
{
...
...
@@ -4252,8 +4268,10 @@ static bool AddFragment( demux_t *p_demux, MP4_Box_t *p_moox )
static
int
ProbeFragments
(
demux_t
*
p_demux
)
{
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
uint64_t
i_current_pos
;
msg_Dbg
(
p_demux
,
"probing fragments from %"
PRId64
,
stream_Tell
(
p_demux
->
s
)
);
if
(
MP4_stream_Tell
(
p_demux
->
s
,
&
i_current_pos
)
)
msg_Dbg
(
p_demux
,
"probing fragments from %"
PRId64
,
i_current_pos
);
assert
(
p_sys
->
p_root
);
...
...
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