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
208c5a08
Commit
208c5a08
authored
Jun 19, 2012
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/qtrlenc: return proper error codes from qtrle_encode_init()
parent
5793a6d9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
qtrleenc.c
libavcodec/qtrleenc.c
+5
-4
No files found.
libavcodec/qtrleenc.c
View file @
208c5a08
...
...
@@ -64,9 +64,10 @@ typedef struct QtrleEncContext {
static
av_cold
int
qtrle_encode_init
(
AVCodecContext
*
avctx
)
{
QtrleEncContext
*
s
=
avctx
->
priv_data
;
int
ret
;
if
(
av_image_check_size
(
avctx
->
width
,
avctx
->
height
,
0
,
avctx
)
<
0
)
{
return
-
1
;
return
AVERROR
(
EINVAL
)
;
}
s
->
avctx
=
avctx
;
s
->
logical_width
=
avctx
->
width
;
...
...
@@ -96,11 +97,11 @@ static av_cold int qtrle_encode_init(AVCodecContext *avctx)
s
->
length_table
=
av_mallocz
((
s
->
logical_width
+
1
)
*
sizeof
(
int
));
if
(
!
s
->
skip_table
||
!
s
->
length_table
||
!
s
->
rlecode_table
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Error allocating memory.
\n
"
);
return
-
1
;
return
AVERROR
(
ENOMEM
)
;
}
if
(
avpicture_alloc
(
&
s
->
previous_frame
,
avctx
->
pix_fmt
,
avctx
->
width
,
avctx
->
height
)
<
0
)
{
if
(
(
ret
=
avpicture_alloc
(
&
s
->
previous_frame
,
avctx
->
pix_fmt
,
avctx
->
width
,
avctx
->
height
)
)
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Error allocating picture
\n
"
);
return
-
1
;
return
ret
;
}
s
->
max_buf_size
=
s
->
logical_width
*
s
->
avctx
->
height
*
s
->
pixel_size
*
2
/* image base material */
...
...
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