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
8fd4d1f9
Commit
8fd4d1f9
authored
Nov 17, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cscd: return meaningful error codes.
parent
67360ccd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
cscd.c
libavcodec/cscd.c
+6
-5
No files found.
libavcodec/cscd.c
View file @
8fd4d1f9
...
...
@@ -143,10 +143,11 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
int
buf_size
=
avpkt
->
size
;
CamStudioContext
*
c
=
avctx
->
priv_data
;
AVFrame
*
picture
=
data
;
int
ret
;
if
(
buf_size
<
2
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"coded frame too small
\n
"
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
if
(
c
->
pic
.
data
[
0
])
...
...
@@ -154,9 +155,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
c
->
pic
.
reference
=
1
;
c
->
pic
.
buffer_hints
=
FF_BUFFER_HINTS_VALID
|
FF_BUFFER_HINTS_READABLE
|
FF_BUFFER_HINTS_PRESERVE
|
FF_BUFFER_HINTS_REUSABLE
;
if
(
ff_get_buffer
(
avctx
,
&
c
->
pic
)
<
0
)
{
if
(
(
ret
=
ff_get_buffer
(
avctx
,
&
c
->
pic
)
)
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"get_buffer() failed
\n
"
);
return
-
1
;
return
ret
;
}
// decompress data
...
...
@@ -175,12 +176,12 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
break
;
#else
av_log
(
avctx
,
AV_LOG_ERROR
,
"compiled without zlib support
\n
"
);
return
-
1
;
return
AVERROR
(
ENOSYS
)
;
#endif
}
default:
av_log
(
avctx
,
AV_LOG_ERROR
,
"unknown compression
\n
"
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
// flip upside down, add difference frame
...
...
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