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
1e2fd57f
Commit
1e2fd57f
authored
Feb 12, 2016
by
Kieran Kunhya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/cfhd: Fix errors with valid files.
parent
bbc4d069
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
cfhd.c
libavcodec/cfhd.c
+3
-3
No files found.
libavcodec/cfhd.c
View file @
1e2fd57f
...
...
@@ -312,7 +312,7 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame,
s
->
plane
[
s
->
channel_num
].
band
[
0
][
0
].
width
=
data
;
s
->
plane
[
s
->
channel_num
].
band
[
0
][
0
].
stride
=
data
;
av_log
(
avctx
,
AV_LOG_DEBUG
,
"Lowpass width %"
PRIu16
"
\n
"
,
data
);
if
(
data
<
2
||
(
data
&
1
)
||
data
>
s
->
plane
[
s
->
channel_num
].
band
[
0
][
0
].
a_width
)
{
if
(
data
<
2
||
data
>
s
->
plane
[
s
->
channel_num
].
band
[
0
][
0
].
a_width
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Invalid lowpass width
\n
"
);
ret
=
AVERROR
(
EINVAL
);
break
;
...
...
@@ -358,7 +358,7 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame,
s
->
plane
[
s
->
channel_num
].
band
[
s
->
level
][
s
->
subband_num
].
width
=
data
;
s
->
plane
[
s
->
channel_num
].
band
[
s
->
level
][
s
->
subband_num
].
stride
=
FFALIGN
(
data
,
8
);
av_log
(
avctx
,
AV_LOG_DEBUG
,
"Highpass width %i channel %i level %i subband %i
\n
"
,
data
,
s
->
channel_num
,
s
->
level
,
s
->
subband_num
);
if
(
data
<
2
||
(
data
&
1
)
)
{
if
(
data
<
2
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Invalid highpass width
\n
"
);
ret
=
AVERROR
(
EINVAL
);
break
;
...
...
@@ -375,7 +375,7 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame,
s
->
plane
[
s
->
channel_num
].
band
[
s
->
level
][
s
->
subband_num
].
width
=
data
;
s
->
plane
[
s
->
channel_num
].
band
[
s
->
level
][
s
->
subband_num
].
stride
=
FFALIGN
(
data
,
8
);
av_log
(
avctx
,
AV_LOG_DEBUG
,
"Highpass width2 %i
\n
"
,
data
);
if
(
data
<
2
||
(
data
&
1
)
)
{
if
(
data
<
2
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Invalid highpass width2
\n
"
);
ret
=
AVERROR
(
EINVAL
);
break
;
...
...
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