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
4cf2e30f
Commit
4cf2e30f
authored
May 02, 2011
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support decoding of 8 bit True Audio samples-
Many samples will fail because "Output buffer size is too small."
parent
fba418e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
tta.c
libavcodec/tta.c
+8
-1
No files found.
libavcodec/tta.c
View file @
4cf2e30f
...
...
@@ -263,7 +263,7 @@ static av_cold int tta_decode_init(AVCodecContext * avctx)
return
-
1
;
}
else
switch
(
s
->
bps
)
{
//
case 1: avctx->sample_fmt = AV_SAMPLE_FMT_U8; break;
case
1
:
avctx
->
sample_fmt
=
AV_SAMPLE_FMT_U8
;
break
;
case
2
:
avctx
->
sample_fmt
=
AV_SAMPLE_FMT_S16
;
break
;
// case 3: avctx->sample_fmt = AV_SAMPLE_FMT_S24; break;
case
4
:
avctx
->
sample_fmt
=
AV_SAMPLE_FMT_S32
;
break
;
...
...
@@ -442,6 +442,13 @@ static int tta_decode_frame(AVCodecContext *avctx,
// convert to output buffer
switch
(
s
->
bps
)
{
case
1
:
{
uint8_t
*
samples
=
data
;
for
(
p
=
s
->
decode_buffer
;
p
<
s
->
decode_buffer
+
(
framelen
*
s
->
channels
);
p
++
)
*
samples
++
=
*
p
+
0x80
;
*
data_size
=
samples
-
(
uint8_t
*
)
data
;
break
;
}
case
2
:
{
uint16_t
*
samples
=
data
;
for
(
p
=
s
->
decode_buffer
;
p
<
s
->
decode_buffer
+
(
framelen
*
s
->
channels
);
p
++
)
{
...
...
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