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
aae6eead
Commit
aae6eead
authored
Oct 27, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dca: return error if the frame header is invalid
parent
f44059d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
dca.c
libavcodec/dca.c
+3
-4
No files found.
libavcodec/dca.c
View file @
aae6eead
...
...
@@ -1637,7 +1637,7 @@ static int dca_decode_frame(AVCodecContext * avctx,
int
lfe_samples
;
int
num_core_channels
=
0
;
int
i
;
int
i
,
ret
;
float
*
samples_flt
=
data
;
int16_t
*
samples_s16
=
data
;
int
out_size
;
...
...
@@ -1656,10 +1656,9 @@ static int dca_decode_frame(AVCodecContext * avctx,
}
init_get_bits
(
&
s
->
gb
,
s
->
dca_buffer
,
s
->
dca_buffer_size
*
8
);
if
(
dca_parse_frame_header
(
s
)
<
0
)
{
if
(
(
ret
=
dca_parse_frame_header
(
s
)
)
<
0
)
{
//seems like the frame is corrupt, try with the next one
*
data_size
=
0
;
return
buf_size
;
return
ret
;
}
//set AVCodec values with parsed data
avctx
->
sample_rate
=
s
->
sample_rate
;
...
...
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