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
8562d9bd
Commit
8562d9bd
authored
Dec 08, 2011
by
John Brooks
Committed by
Janne Grunau
Dec 08, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shorten: avoid abort() on unknown audio types
Signed-off-by:
Janne Grunau
<
janne-libav@jannau.net
>
parent
e93947b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
shorten.c
libavcodec/shorten.c
+5
-3
No files found.
libavcodec/shorten.c
View file @
8562d9bd
...
...
@@ -176,7 +176,7 @@ static void fix_bitshift(ShortenContext *s, int32_t *buffer)
}
static
void
init_offset
(
ShortenContext
*
s
)
static
int
init_offset
(
ShortenContext
*
s
)
{
int32_t
mean
=
0
;
int
chan
,
i
;
...
...
@@ -190,12 +190,13 @@ static void init_offset(ShortenContext *s)
break
;
default:
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"unknown audio type"
);
abort
()
;
return
AVERROR_INVALIDDATA
;
}
for
(
chan
=
0
;
chan
<
s
->
channels
;
chan
++
)
for
(
i
=
0
;
i
<
nblock
;
i
++
)
s
->
offset
[
chan
][
i
]
=
mean
;
return
0
;
}
static
int
decode_wave_header
(
AVCodecContext
*
avctx
,
const
uint8_t
*
header
,
...
...
@@ -367,7 +368,8 @@ static int read_header(ShortenContext *s)
if
((
ret
=
allocate_buffers
(
s
))
<
0
)
return
ret
;
init_offset
(
s
);
if
((
ret
=
init_offset
(
s
))
<
0
)
return
ret
;
if
(
s
->
version
>
1
)
s
->
lpcqoffset
=
V2LPCQOFFSET
;
...
...
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