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
a2c41526
Commit
a2c41526
authored
Aug 24, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made the seeking code path a bit more clear (nuv).
parent
75171d2b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
19 deletions
+20
-19
modules/demux/nuv.c
modules/demux/nuv.c
+20
-19
No files found.
modules/demux/nuv.c
View file @
a2c41526
...
...
@@ -728,9 +728,6 @@ static int SeekTableLoad( demux_t *p_demux, demux_sys_t *p_sys )
{
frame_header_t
fh
;
int64_t
i_original_pos
;
uint8_t
*
p_seek_table
;
uint8_t
*
p_kfa_table
;
int32_t
i_seek_elements
=
0
,
i_kfa_elements
=
0
,
j
;
int64_t
i_time
,
i_offset
;
int
keyframe
,
last_keyframe
=
0
,
frame
=
0
,
kfa_entry_id
=
0
;
...
...
@@ -750,29 +747,29 @@ static int SeekTableLoad( demux_t *p_demux, demux_sys_t *p_sys )
if
(
FrameHeaderLoad
(
p_demux
,
&
fh
)
)
return
VLC_EGENERIC
;
if
(
fh
.
i_type
==
'Q'
)
{
p_seek_table
=
malloc
(
fh
.
i_length
);
if
(
p_seek_table
==
NULL
)
return
VLC_ENOMEM
;
if
(
stream_Read
(
p_demux
->
s
,
p_seek_table
,
fh
.
i_length
)
!=
fh
.
i_length
)
{
free
(
p_seek_table
);
return
VLC_EGENERIC
;
}
i_seek_elements
=
fh
.
i_length
/
12
;
}
else
if
(
fh
.
i_type
!=
'Q'
)
{
msg_Warn
(
p_demux
,
"invalid seektable, frame type=%c"
,
fh
.
i_type
);
stream_Seek
(
p_demux
->
s
,
i_original_pos
);
return
VLC_EGENERIC
;
}
/* */
uint8_t
*
p_seek_table
=
malloc
(
fh
.
i_length
);
if
(
p_seek_table
==
NULL
)
return
VLC_ENOMEM
;
if
(
stream_Read
(
p_demux
->
s
,
p_seek_table
,
fh
.
i_length
)
!=
fh
.
i_length
)
{
free
(
p_seek_table
);
return
VLC_EGENERIC
;
}
const
int32_t
i_seek_elements
=
fh
.
i_length
/
12
;
/* Get keyframe adjust offsets */
int32_t
i_kfa_elements
;
uint8_t
*
p_kfa_table
;
if
(
p_sys
->
exh
.
i_keyframe_adjust_offset
>
0
)
{
msg_Dbg
(
p_demux
,
"seeking in stream to %"
PRIi64
,
p_sys
->
exh
.
i_keyframe_adjust_offset
);
...
...
@@ -808,12 +805,16 @@ static int SeekTableLoad( demux_t *p_demux, demux_sys_t *p_sys )
i_kfa_elements
=
fh
.
i_length
/
8
;
}
}
else
{
i_kfa_elements
=
0
;
}
if
(
i_kfa_elements
>
0
)
msg_Warn
(
p_demux
,
"untested keyframe adjust support, upload samples"
);
for
(
j
=
0
;
j
<
i_seek_elements
;
j
++
)
for
(
int32_t
j
=
0
;
j
<
i_seek_elements
;
j
++
)
{
#if 0
uint8_t* p = p_seek_table + j * 12;
...
...
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