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
9e676490
Commit
9e676490
authored
Nov 17, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msrle: return meaningful error codes.
parent
8fd4d1f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
msrle.c
libavcodec/msrle.c
+4
-3
No files found.
libavcodec/msrle.c
View file @
9e676490
...
...
@@ -63,7 +63,7 @@ static av_cold int msrle_decode_init(AVCodecContext *avctx)
break
;
default:
av_log
(
avctx
,
AV_LOG_ERROR
,
"unsupported bits per sample
\n
"
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
s
->
frame
.
data
[
0
]
=
NULL
;
...
...
@@ -79,15 +79,16 @@ static int msrle_decode_frame(AVCodecContext *avctx,
int
buf_size
=
avpkt
->
size
;
MsrleContext
*
s
=
avctx
->
priv_data
;
int
istride
=
FFALIGN
(
avctx
->
width
*
avctx
->
bits_per_coded_sample
,
32
)
/
8
;
int
ret
;
s
->
buf
=
buf
;
s
->
size
=
buf_size
;
s
->
frame
.
reference
=
1
;
s
->
frame
.
buffer_hints
=
FF_BUFFER_HINTS_VALID
|
FF_BUFFER_HINTS_PRESERVE
|
FF_BUFFER_HINTS_REUSABLE
;
if
(
avctx
->
reget_buffer
(
avctx
,
&
s
->
frame
)
)
{
if
(
(
ret
=
avctx
->
reget_buffer
(
avctx
,
&
s
->
frame
))
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"reget_buffer() failed
\n
"
);
return
-
1
;
return
ret
;
}
if
(
avctx
->
bits_per_coded_sample
<=
8
)
{
...
...
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