Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
b14c42aa
Commit
b14c42aa
authored
Sep 14, 2020
by
Andreas Rheinhardt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/flashsv2enc: Return better error codes
Signed-off-by:
Andreas Rheinhardt
<
andreas.rheinhardt@gmail.com
>
parent
42ed9707
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
flashsv2enc.c
libavcodec/flashsv2enc.c
+6
-5
No files found.
libavcodec/flashsv2enc.c
View file @
b14c42aa
...
...
@@ -177,6 +177,7 @@ static void reset_stats(FlashSV2Context * s)
static
av_cold
int
flashsv2_encode_init
(
AVCodecContext
*
avctx
)
{
FlashSV2Context
*
s
=
avctx
->
priv_data
;
int
ret
;
s
->
avctx
=
avctx
;
...
...
@@ -186,23 +187,23 @@ static av_cold int flashsv2_encode_init(AVCodecContext * avctx)
if
(
s
->
comp
<
0
||
s
->
comp
>
9
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Compression level should be 0-9, not %d
\n
"
,
s
->
comp
);
return
-
1
;
return
AVERROR
(
EINVAL
)
;
}
if
((
avctx
->
width
>
4095
)
||
(
avctx
->
height
>
4095
))
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Input dimensions too large, input must be max 4095x4095 !
\n
"
);
return
-
1
;
return
AVERROR
(
EINVAL
)
;
}
if
((
avctx
->
width
<
16
)
||
(
avctx
->
height
<
16
))
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Input dimensions too small, input must be at least 16x16 !
\n
"
);
return
-
1
;
return
AVERROR
(
EINVAL
)
;
}
if
(
av_image_check_size
(
avctx
->
width
,
avctx
->
height
,
0
,
avctx
)
<
0
)
return
-
1
;
if
(
(
ret
=
av_image_check_size
(
avctx
->
width
,
avctx
->
height
,
0
,
avctx
)
)
<
0
)
return
ret
;
s
->
last_key_frame
=
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