Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
a80ce390
Commit
a80ce390
authored
Aug 06, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avidec: parse INFO tags at the end
Fixes Ticket1123 Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
21eafa18
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
avidec.c
libavformat/avidec.c
+12
-5
No files found.
libavformat/avidec.c
View file @
a80ce390
...
...
@@ -1376,16 +1376,19 @@ static int avi_load_index(AVFormatContext *s)
AVIOContext
*
pb
=
s
->
pb
;
uint32_t
tag
,
size
;
int64_t
pos
=
avio_tell
(
pb
);
int64_t
next
;
int
ret
=
-
1
;
if
(
avio_seek
(
pb
,
avi
->
movi_end
,
SEEK_SET
)
<
0
)
goto
the_end
;
// maybe truncated file
av_dlog
(
s
,
"movi_end=0x%"
PRIx64
"
\n
"
,
avi
->
movi_end
);
for
(;;)
{
if
(
url_feof
(
pb
))
break
;
tag
=
avio_rl32
(
pb
);
size
=
avio_rl32
(
pb
);
if
(
url_feof
(
pb
))
break
;
next
=
avio_tell
(
pb
)
+
size
+
(
size
&
1
);
av_dlog
(
s
,
"tag=%c%c%c%c size=0x%x
\n
"
,
tag
&
0xff
,
(
tag
>>
8
)
&
0xff
,
...
...
@@ -1397,11 +1400,15 @@ static int avi_load_index(AVFormatContext *s)
avi_read_idx1
(
s
,
size
)
>=
0
)
{
avi
->
index_loaded
=
2
;
ret
=
0
;
}
else
if
(
tag
==
MKTAG
(
'L'
,
'I'
,
'S'
,
'T'
))
{
uint32_t
tag1
=
avio_rl32
(
pb
);
if
(
tag1
==
MKTAG
(
'I'
,
'N'
,
'F'
,
'O'
))
ff_read_riff_info
(
s
,
size
-
4
);
}
else
if
(
!
ret
)
break
;
}
size
+=
(
size
&
1
);
if
(
avio_skip
(
pb
,
size
)
<
0
)
if
(
avio_seek
(
pb
,
next
,
SEEK_SET
)
<
0
)
break
;
// something is wrong here
}
the_end
:
...
...
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