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
7fb87bc5
Commit
7fb87bc5
authored
Jan 07, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpeg12enc: check dimension validity
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
bcc4ef1a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
mpeg12enc.c
libavcodec/mpeg12enc.c
+13
-0
No files found.
libavcodec/mpeg12enc.c
View file @
7fb87bc5
...
...
@@ -180,6 +180,19 @@ static av_cold int encode_init(AVCodecContext *avctx)
}
}
if
((
avctx
->
width
&
0xFFF
)
==
0
&&
(
avctx
->
height
&
0xFFF
)
==
1
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Width / Height is invalid for MPEG2
\n
"
);
return
AVERROR
(
EINVAL
);
}
if
(
s
->
strict_std_compliance
>
FF_COMPLIANCE_UNOFFICIAL
)
{
if
((
avctx
->
width
&
0xFFF
)
==
0
||
(
avctx
->
height
&
0xFFF
)
==
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Width or Height are not allowed to be multiplies of 4096
\n
"
"add '-strict %d' if you want to use them anyway.
\n
"
,
FF_COMPLIANCE_UNOFFICIAL
);
return
AVERROR
(
EINVAL
);
}
}
s
->
drop_frame_timecode
=
s
->
drop_frame_timecode
||
!!
(
avctx
->
flags2
&
CODEC_FLAG2_DROP_FRAME_TIMECODE
);
if
(
s
->
drop_frame_timecode
)
s
->
tc
.
flags
|=
AV_TIMECODE_FLAG_DROPFRAME
;
...
...
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