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
10ac70d2
Commit
10ac70d2
authored
Nov 05, 2012
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avrndec: use more meaningful error codes
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
70727e87
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
avrndec.c
libavcodec/avrndec.c
+4
-4
No files found.
libavcodec/avrndec.c
View file @
10ac70d2
...
...
@@ -42,7 +42,7 @@ static av_cold int init(AVCodecContext *avctx)
return
ff_mjpeg_decode_init
(
avctx
);
if
(
avctx
->
width
<=
0
||
avctx
->
height
<=
0
)
return
-
1
;
return
AVERROR_INVALIDDATA
;
avcodec_get_frame_defaults
(
&
a
->
frame
);
avctx
->
pix_fmt
=
AV_PIX_FMT_UYVY422
;
...
...
@@ -79,7 +79,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
const
uint8_t
*
buf
=
avpkt
->
data
;
int
buf_size
=
avpkt
->
size
;
int
true_height
=
buf_size
/
(
2
*
avctx
->
width
);
int
y
;
int
y
,
ret
;
if
(
a
->
is_mjpeg
)
return
ff_mjpeg_decode_frame
(
avctx
,
data
,
data_size
,
avpkt
);
...
...
@@ -92,9 +92,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
return
AVERROR_INVALIDDATA
;
}
if
(
avctx
->
get_buffer
(
avctx
,
p
)
<
0
){
if
(
(
ret
=
avctx
->
get_buffer
(
avctx
,
p
)
)
<
0
){
av_log
(
avctx
,
AV_LOG_ERROR
,
"get_buffer() failed
\n
"
);
return
-
1
;
return
ret
;
}
p
->
pict_type
=
AV_PICTURE_TYPE_I
;
p
->
key_frame
=
1
;
...
...
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