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
1a31dff9
Commit
1a31dff9
authored
Nov 19, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
loco: return meaningful error codes.
parent
a9d970a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
loco.c
libavcodec/loco.c
+5
-5
No files found.
libavcodec/loco.c
View file @
1a31dff9
...
...
@@ -165,15 +165,15 @@ static int decode_frame(AVCodecContext *avctx,
int
buf_size
=
avpkt
->
size
;
LOCOContext
*
const
l
=
avctx
->
priv_data
;
AVFrame
*
const
p
=
&
l
->
pic
;
int
decoded
;
int
decoded
,
ret
;
if
(
p
->
data
[
0
])
avctx
->
release_buffer
(
avctx
,
p
);
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
"
);
return
-
1
;
return
ret
;
}
p
->
key_frame
=
1
;
...
...
@@ -237,7 +237,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
if
(
avctx
->
extradata_size
<
12
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Extradata size must be >= 12 instead of %i
\n
"
,
avctx
->
extradata_size
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
version
=
AV_RL32
(
avctx
->
extradata
);
switch
(
version
)
{
...
...
@@ -268,7 +268,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
break
;
default
:
av_log
(
avctx
,
AV_LOG_INFO
,
"Unknown colorspace, index = %i
\n
"
,
l
->
mode
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
if
(
avctx
->
debug
&
FF_DEBUG_PICT_INFO
)
av_log
(
avctx
,
AV_LOG_INFO
,
"lossy:%i, version:%i, mode: %i
\n
"
,
l
->
lossy
,
version
,
l
->
mode
);
...
...
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