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
d8d124ee
Commit
d8d124ee
authored
Jun 15, 2015
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aic: Improve error reporting
parent
a4fbd55d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
aic.c
libavcodec/aic.c
+11
-4
No files found.
libavcodec/aic.c
View file @
d8d124ee
...
...
@@ -385,8 +385,11 @@ static int aic_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
return
AVERROR_INVALIDDATA
;
}
if
((
ret
=
aic_decode_header
(
ctx
,
buf
,
buf_size
))
<
0
)
ret
=
aic_decode_header
(
ctx
,
buf
,
buf_size
);
if
(
ret
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Invalid header
\n
"
);
return
ret
;
}
if
((
ret
=
ff_get_buffer
(
avctx
,
ctx
->
frame
,
0
))
<
0
)
return
ret
;
...
...
@@ -398,13 +401,17 @@ static int aic_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
for
(
x
=
0
;
x
<
ctx
->
mb_width
;
x
+=
ctx
->
slice_width
)
{
slice_size
=
bytestream2_get_le16
(
&
gb
)
*
4
;
if
(
slice_size
+
off
>
buf_size
||
!
slice_size
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Incorrect slice size
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Incorrect slice size %d at %d.%d
\n
"
,
slice_size
,
x
,
y
);
return
AVERROR_INVALIDDATA
;
}
if
((
ret
=
aic_decode_slice
(
ctx
,
x
,
y
,
buf
+
off
,
slice_size
))
<
0
)
ret
=
aic_decode_slice
(
ctx
,
x
,
y
,
buf
+
off
,
slice_size
);
if
(
ret
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Error decoding slice at %d.%d
\n
"
,
x
,
y
);
return
ret
;
}
off
+=
slice_size
;
}
...
...
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