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
e706e2e7
Commit
e706e2e7
authored
Dec 03, 2016
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/ffmdec: Check media type for chunks
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
591c0324
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
ffmdec.c
libavformat/ffmdec.c
+4
-4
No files found.
libavformat/ffmdec.c
View file @
e706e2e7
...
...
@@ -381,7 +381,7 @@ static int ffm2_read_header(AVFormatContext *s)
}
break
;
case
MKBETAG
(
'S'
,
'T'
,
'V'
,
'I'
):
if
(
f_stvi
++
)
{
if
(
f_stvi
++
||
codecpar
->
codec_type
!=
AVMEDIA_TYPE_VIDEO
)
{
ret
=
AVERROR
(
EINVAL
);
goto
fail
;
}
...
...
@@ -445,7 +445,7 @@ static int ffm2_read_header(AVFormatContext *s)
avio_rb32
(
pb
);
// refs
break
;
case
MKBETAG
(
'S'
,
'T'
,
'A'
,
'U'
):
if
(
f_stau
++
)
{
if
(
f_stau
++
||
codecpar
->
codec_type
!=
AVMEDIA_TYPE_AUDIO
)
{
ret
=
AVERROR
(
EINVAL
);
goto
fail
;
}
...
...
@@ -474,7 +474,7 @@ static int ffm2_read_header(AVFormatContext *s)
}
break
;
case
MKBETAG
(
'S'
,
'2'
,
'V'
,
'I'
):
if
(
f_stvi
++
||
!
size
)
{
if
(
f_stvi
++
||
!
size
||
codecpar
->
codec_type
!=
AVMEDIA_TYPE_VIDEO
)
{
ret
=
AVERROR
(
EINVAL
);
goto
fail
;
}
...
...
@@ -492,7 +492,7 @@ static int ffm2_read_header(AVFormatContext *s)
goto
fail
;
break
;
case
MKBETAG
(
'S'
,
'2'
,
'A'
,
'U'
):
if
(
f_stau
++
||
!
size
)
{
if
(
f_stau
++
||
!
size
||
codecpar
->
codec_type
!=
AVMEDIA_TYPE_AUDIO
)
{
ret
=
AVERROR
(
EINVAL
);
goto
fail
;
}
...
...
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