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
2ebaadf3
Commit
2ebaadf3
authored
Dec 29, 2013
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/mjpegenc: use proper error codes.
parent
19a2d101
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
mjpegenc.c
libavcodec/mjpegenc.c
+3
-3
No files found.
libavcodec/mjpegenc.c
View file @
2ebaadf3
...
@@ -48,12 +48,12 @@ av_cold int ff_mjpeg_encode_init(MpegEncContext *s)
...
@@ -48,12 +48,12 @@ av_cold int ff_mjpeg_encode_init(MpegEncContext *s)
if
(
s
->
width
>
65500
||
s
->
height
>
65500
)
{
if
(
s
->
width
>
65500
||
s
->
height
>
65500
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"JPEG does not support resolutions above 65500x65500
\n
"
);
av_log
(
s
,
AV_LOG_ERROR
,
"JPEG does not support resolutions above 65500x65500
\n
"
);
return
-
1
;
return
AVERROR
(
EINVAL
)
;
}
}
m
=
av_malloc
(
sizeof
(
MJpegContext
));
m
=
av_malloc
(
sizeof
(
MJpegContext
));
if
(
!
m
)
if
(
!
m
)
return
-
1
;
return
AVERROR
(
ENOMEM
)
;
s
->
min_qcoeff
=-
1023
;
s
->
min_qcoeff
=-
1023
;
s
->
max_qcoeff
=
1023
;
s
->
max_qcoeff
=
1023
;
...
@@ -545,7 +545,7 @@ static int amv_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
...
@@ -545,7 +545,7 @@ static int amv_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
//CODEC_FLAG_EMU_EDGE have to be cleared
//CODEC_FLAG_EMU_EDGE have to be cleared
if
(
s
->
avctx
->
flags
&
CODEC_FLAG_EMU_EDGE
)
if
(
s
->
avctx
->
flags
&
CODEC_FLAG_EMU_EDGE
)
return
-
1
;
return
AVERROR
(
EINVAL
)
;
pic
=
av_frame_alloc
();
pic
=
av_frame_alloc
();
if
(
!
pic
)
if
(
!
pic
)
...
...
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