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
5c72cad8
Commit
5c72cad8
authored
Apr 19, 2006
by
Baptiste Coudurier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
always skip garbage at end of atom
Originally committed as revision 5300 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
98d12b09
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
mov.c
libavformat/mov.c
+6
-7
No files found.
libavformat/mov.c
View file @
5c72cad8
...
...
@@ -461,7 +461,12 @@ static int mov_read_default(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
if
(
c
->
parse_table
[
i
].
type
==
0
)
{
/* skip leaf atoms data */
url_fskip
(
pb
,
a
.
size
);
}
else
{
offset_t
start_pos
=
url_ftell
(
pb
);
int64_t
left
;
err
=
(
c
->
parse_table
[
i
].
func
)(
c
,
pb
,
a
);
left
=
a
.
size
-
url_ftell
(
pb
)
+
start_pos
;
if
(
left
>
0
)
/* skip garbage at atom end */
url_fskip
(
pb
,
left
);
}
a
.
offset
+=
a
.
size
;
...
...
@@ -571,7 +576,6 @@ static int mov_read_esds(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
{
AVStream
*
st
=
c
->
fc
->
streams
[
c
->
fc
->
nb_streams
-
1
];
MOVStreamContext
*
sc
=
(
MOVStreamContext
*
)
st
->
priv_data
;
int64_t
start_pos
=
url_ftell
(
pb
);
int
tag
,
len
;
/* Well, broken but suffisant for some MP4 streams */
...
...
@@ -606,8 +610,6 @@ static int mov_read_esds(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
}
}
}
/* in any case, skip garbage */
url_fskip
(
pb
,
atom
.
size
-
((
url_ftell
(
pb
)
-
start_pos
)));
return
0
;
}
...
...
@@ -801,7 +803,6 @@ static int mov_read_alac(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
static
int
mov_read_wave
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV_atom_t
atom
)
{
offset_t
start_pos
=
url_ftell
(
pb
);
AVStream
*
st
=
c
->
fc
->
streams
[
c
->
fc
->
nb_streams
-
1
];
if
((
uint64_t
)
atom
.
size
>
(
1
<<
30
))
...
...
@@ -819,10 +820,8 @@ static int mov_read_wave(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
url_fskip
(
pb
,
atom
.
size
);
}
else
if
(
atom
.
size
>
8
)
{
/* to read frma, esds atoms */
mov_read_default
(
c
,
pb
,
atom
);
}
else
if
(
atom
.
size
>
0
)
}
else
url_fskip
(
pb
,
atom
.
size
);
/* in any case, skip garbage */
url_fskip
(
pb
,
atom
.
size
-
((
url_ftell
(
pb
)
-
start_pos
)));
return
0
;
}
...
...
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