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
339d8fb3
Commit
339d8fb3
authored
Jul 15, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/mpegvideo_enc: check intra dc precission
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
97f86cd9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
mpegvideo_enc.c
libavcodec/mpegvideo_enc.c
+11
-0
No files found.
libavcodec/mpegvideo_enc.c
View file @
339d8fb3
...
@@ -342,6 +342,17 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
...
@@ -342,6 +342,17 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
}
else
if
(
s
->
intra_dc_precision
>=
8
)
}
else
if
(
s
->
intra_dc_precision
>=
8
)
s
->
intra_dc_precision
-=
8
;
s
->
intra_dc_precision
-=
8
;
if
(
s
->
intra_dc_precision
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"intra dc precision must be positive, note some applications use"
" 0 and some 8 as base meaning 8bit, the value must not be smaller than that
\n
"
);
return
AVERROR
(
EINVAL
);
}
if
(
s
->
intra_dc_precision
>
(
avctx
->
codec_id
==
AV_CODEC_ID_MPEG2VIDEO
?
3
:
0
))
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"intra dc precision too large
\n
"
);
return
AVERROR
(
EINVAL
);
}
s
->
user_specified_pts
=
AV_NOPTS_VALUE
;
s
->
user_specified_pts
=
AV_NOPTS_VALUE
;
if
(
s
->
gop_size
<=
1
)
{
if
(
s
->
gop_size
<=
1
)
{
...
...
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