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
916e40b5
Commit
916e40b5
authored
Oct 15, 2012
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
smacker: return more meaningfull error codes
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
ae237a11
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
smacker.c
libavcodec/smacker.c
+6
-6
No files found.
libavcodec/smacker.c
View file @
916e40b5
...
@@ -362,18 +362,18 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
...
@@ -362,18 +362,18 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
GetByteContext
gb2
;
GetByteContext
gb2
;
GetBitContext
gb
;
GetBitContext
gb
;
int
blocks
,
blk
,
bw
,
bh
;
int
blocks
,
blk
,
bw
,
bh
;
int
i
;
int
i
,
ret
;
int
stride
;
int
stride
;
int
flags
;
int
flags
;
if
(
avpkt
->
size
<=
769
)
if
(
avpkt
->
size
<=
769
)
return
0
;
return
AVERROR_INVALIDDATA
;
smk
->
pic
.
reference
=
3
;
smk
->
pic
.
reference
=
3
;
smk
->
pic
.
buffer_hints
=
FF_BUFFER_HINTS_VALID
|
FF_BUFFER_HINTS_PRESERVE
|
FF_BUFFER_HINTS_REUSABLE
;
smk
->
pic
.
buffer_hints
=
FF_BUFFER_HINTS_VALID
|
FF_BUFFER_HINTS_PRESERVE
|
FF_BUFFER_HINTS_REUSABLE
;
if
(
avctx
->
reget_buffer
(
avctx
,
&
smk
->
pic
)
<
0
){
if
(
(
ret
=
avctx
->
reget_buffer
(
avctx
,
&
smk
->
pic
)
)
<
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
;
}
}
/* make the palette available on the way out */
/* make the palette available on the way out */
...
@@ -528,11 +528,11 @@ static av_cold int decode_init(AVCodecContext *avctx)
...
@@ -528,11 +528,11 @@ static av_cold int decode_init(AVCodecContext *avctx)
/* decode huffman trees from extradata */
/* decode huffman trees from extradata */
if
(
avctx
->
extradata_size
<
16
){
if
(
avctx
->
extradata_size
<
16
){
av_log
(
avctx
,
AV_LOG_ERROR
,
"Extradata missing!
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Extradata missing!
\n
"
);
return
-
1
;
return
AVERROR
(
EINVAL
)
;
}
}
if
(
decode_header_trees
(
c
))
if
(
decode_header_trees
(
c
))
return
-
1
;
return
AVERROR_INVALIDDATA
;
return
0
;
return
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