Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
8cf44c19
Commit
8cf44c19
authored
Apr 13, 2007
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/demux/asf/* use index for seeking if available and if there's a video track.
parent
44cb59ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
4 deletions
+21
-4
modules/demux/asf/libasf.c
modules/demux/asf/libasf.c
+21
-4
No files found.
modules/demux/asf/libasf.c
View file @
8cf44c19
...
...
@@ -211,18 +211,21 @@ static int ASF_ReadObject_Data( stream_t *s, asf_object_t *p_obj )
static
int
ASF_ReadObject_Index
(
stream_t
*
s
,
asf_object_t
*
p_obj
)
{
asf_object_index_t
*
p_index
=
(
asf_object_index_t
*
)
p_obj
;
int
i_peek
;
uint8_t
*
p_peek
;
int
i
;
if
(
(
i_peek
=
stream_Peek
(
s
,
&
p_peek
,
56
)
)
<
56
)
if
(
stream_Peek
(
s
,
&
p_peek
,
p_index
->
i_object_size
)
<
(
int
)
p_index
->
i_object_size
)
{
return
VLC_EGENERIC
;
/* Just ignore */
return
VLC_SUCCESS
;
}
ASF_GetGUID
(
&
p_index
->
i_file_id
,
p_peek
+
24
);
p_index
->
i_index_entry_time_interval
=
GetQWLE
(
p_peek
+
40
);
p_index
->
i_max_packet_count
=
GetDWLE
(
p_peek
+
48
);
p_index
->
i_index_entry_count
=
GetDWLE
(
p_peek
+
52
);
p_index
->
index_entry
=
NULL
;
/* FIXME */
p_index
->
index_entry
=
NULL
;
#ifdef ASF_DEBUG
msg_Dbg
(
s
,
...
...
@@ -235,6 +238,20 @@ static int ASF_ReadObject_Index( stream_t *s, asf_object_t *p_obj )
(
long
int
)
p_index
->
i_index_entry_count
);
#endif
/* Sanity checking */
if
(
p_index
->
i_index_entry_count
>
(
p_index
->
i_object_size
-
56
)
/
6
)
p_index
->
i_index_entry_count
=
(
p_index
->
i_object_size
-
56
)
/
6
;
p_index
->
index_entry
=
malloc
(
sizeof
(
asf_index_entry_t
)
*
p_index
->
i_index_entry_count
);
for
(
i
=
0
,
p_peek
+=
56
;
i
<
(
int
)
p_index
->
i_index_entry_count
;
i
++
,
p_peek
+=
6
)
{
p_index
->
index_entry
[
i
].
i_packet_number
=
GetDWLE
(
p_peek
);
p_index
->
index_entry
[
i
].
i_packet_count
=
GetDWLE
(
p_peek
+
4
);
}
return
VLC_SUCCESS
;
}
...
...
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