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
688b132b
Commit
688b132b
authored
Nov 19, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qdrw: return meaningful error codes.
parent
8f178294
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
qdrw.c
libavcodec/qdrw.c
+4
-4
No files found.
libavcodec/qdrw.c
View file @
688b132b
...
@@ -45,7 +45,7 @@ static int decode_frame(AVCodecContext *avctx,
...
@@ -45,7 +45,7 @@ static int decode_frame(AVCodecContext *avctx,
AVFrame
*
const
p
=
&
a
->
pic
;
AVFrame
*
const
p
=
&
a
->
pic
;
uint8_t
*
outdata
;
uint8_t
*
outdata
;
int
colors
;
int
colors
;
int
i
;
int
i
,
ret
;
uint32_t
*
pal
;
uint32_t
*
pal
;
int
r
,
g
,
b
;
int
r
,
g
,
b
;
...
@@ -53,9 +53,9 @@ static int decode_frame(AVCodecContext *avctx,
...
@@ -53,9 +53,9 @@ static int decode_frame(AVCodecContext *avctx,
avctx
->
release_buffer
(
avctx
,
p
);
avctx
->
release_buffer
(
avctx
,
p
);
p
->
reference
=
0
;
p
->
reference
=
0
;
if
(
ff_get_buffer
(
avctx
,
p
)
<
0
)
{
if
((
ret
=
ff_get_buffer
(
avctx
,
p
))
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"get_buffer() failed
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"get_buffer() failed
\n
"
);
return
-
1
;
return
ret
;
}
}
p
->
pict_type
=
AV_PICTURE_TYPE_I
;
p
->
pict_type
=
AV_PICTURE_TYPE_I
;
p
->
key_frame
=
1
;
p
->
key_frame
=
1
;
...
@@ -70,7 +70,7 @@ static int decode_frame(AVCodecContext *avctx,
...
@@ -70,7 +70,7 @@ static int decode_frame(AVCodecContext *avctx,
if
(
colors
<
0
||
colors
>
256
)
{
if
(
colors
<
0
||
colors
>
256
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Error color count - %i(0x%X)
\n
"
,
colors
,
colors
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Error color count - %i(0x%X)
\n
"
,
colors
,
colors
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
}
if
(
buf_end
-
buf
<
(
colors
+
1
)
*
8
)
if
(
buf_end
-
buf
<
(
colors
+
1
)
*
8
)
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
...
...
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