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
eeaaabe0
Commit
eeaaabe0
authored
May 16, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed key flag for odml indexes (avi demuxer).
parent
900c69d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
23 deletions
+16
-23
modules/demux/avi/avi.c
modules/demux/avi/avi.c
+16
-23
No files found.
modules/demux/avi/avi.c
View file @
eeaaabe0
...
...
@@ -2141,11 +2141,6 @@ static int AVI_IndexLoad_idx1( demux_t *p_demux,
if
(
AVI_IndexFind_idx1
(
p_demux
,
&
p_idx1
,
&
i_offset
)
)
return
VLC_EGENERIC
;
/* Init b_keyset */
bool
b_keyset
[
100
];
for
(
unsigned
i_stream
=
0
;
i_stream
<
p_sys
->
i_track
;
i_stream
++
)
b_keyset
[
i_stream
]
=
false
;
for
(
unsigned
i_index
=
0
;
i_index
<
p_idx1
->
i_entry_count
;
i_index
++
)
{
unsigned
i_cat
;
...
...
@@ -2162,31 +2157,16 @@ static int AVI_IndexLoad_idx1( demux_t *p_demux,
index
.
i_flags
=
p_idx1
->
entry
[
i_index
].
i_flags
&
(
~
AVIIF_FIXKEYFRAME
);
index
.
i_pos
=
p_idx1
->
entry
[
i_index
].
i_pos
+
i_offset
;
index
.
i_length
=
p_idx1
->
entry
[
i_index
].
i_length
;
if
(
index
.
i_flags
&
AVIIF_KEYFRAME
)
b_keyset
[
i_stream
]
=
true
;
avi_index_Append
(
pp_index
[
i_stream
],
pi_last_offset
,
&
index
);
}
}
for
(
unsigned
i_stream
=
0
;
i_stream
<
p_sys
->
i_track
;
i_stream
++
)
{
if
(
!
b_keyset
[
i_stream
]
)
{
avi_track_t
*
tk
=
p_sys
->
track
[
i_stream
];
msg_Dbg
(
p_demux
,
"no key frame set for track %d"
,
i_stream
);
for
(
unsigned
i_index
=
0
;
i_index
<
tk
->
idx
.
i_size
;
i_index
++
)
tk
->
idx
.
p_entry
[
i_index
].
i_flags
|=
AVIIF_KEYFRAME
;
}
}
return
VLC_SUCCESS
;
}
static
void
__Parse_indx
(
demux_t
*
p_demux
,
avi_index_t
*
p_index
,
off_t
*
pi_max_offset
,
avi_chunk_indx_t
*
p_indx
)
{
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
avi_entry_t
index
;
msg_Dbg
(
p_demux
,
"loading subindex(0x%x) %d entries"
,
p_indx
->
i_indextype
,
p_indx
->
i_entriesinuse
);
...
...
@@ -2277,7 +2257,6 @@ static void AVI_IndexLoad_indx( demux_t *p_demux,
static
void
AVI_IndexLoad
(
demux_t
*
p_demux
)
{
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
unsigned
int
i_stream
;
assert
(
p_sys
->
i_track
<=
100
);
avi_index_t
*
pp_index
[
p_sys
->
i_track
];
...
...
@@ -2297,10 +2276,24 @@ static void AVI_IndexLoad( demux_t *p_demux )
AVI_IndexLoad_indx
(
p_demux
,
pp_index
,
pi_last_offset
);
}
for
(
i_stream
=
0
;
i_stream
<
p_sys
->
i_track
;
i_stream
++
)
for
(
unsigned
i
=
0
;
i
<
p_sys
->
i_track
;
i
++
)
{
avi_index_t
*
p_index
=
&
p_sys
->
track
[
i
]
->
idx
;
/* Fix key flag */
bool
b_key
=
false
;
for
(
unsigned
j
=
0
;
!
b_key
&&
j
<
p_index
->
i_size
;
j
++
)
b_key
=
p_index
->
p_entry
[
j
].
i_flags
&
AVIIF_KEYFRAME
;
if
(
!
b_key
)
{
msg_Err
(
p_demux
,
"no key frame set for track %u"
,
i
);
for
(
unsigned
j
=
0
;
j
<
p_index
->
i_size
;
j
++
)
p_index
->
p_entry
[
j
].
i_flags
|=
AVIIF_KEYFRAME
;
}
/* */
msg_Dbg
(
p_demux
,
"stream[%d] created %d index entries"
,
i_stream
,
p_sys
->
track
[
i_stream
]
->
idx
.
i_size
);
i
,
p_index
->
i_size
);
}
}
...
...
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