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
6482bd88
Commit
6482bd88
authored
Jul 09, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
alac: add 32-bit decoding support
parent
6cda74c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
alac.c
libavcodec/alac.c
+14
-1
No files found.
libavcodec/alac.c
View file @
6482bd88
...
...
@@ -424,6 +424,18 @@ static int alac_decode_frame(AVCodecContext *avctx, void *data,
*
outbuffer
++
=
alac
->
output_samples_buffer
[
1
][
i
]
<<
8
;
}}
break
;
case
32
:
if
(
channels
==
2
)
{
int32_t
*
outbuffer
=
(
int32_t
*
)
alac
->
frame
.
data
[
0
];
for
(
i
=
0
;
i
<
alac
->
nb_samples
;
i
++
)
{
*
outbuffer
++
=
alac
->
output_samples_buffer
[
0
][
i
];
*
outbuffer
++
=
alac
->
output_samples_buffer
[
1
][
i
];
}
}
else
{
memcpy
(
alac
->
frame
.
data
[
0
],
alac
->
output_samples_buffer
[
0
],
alac
->
nb_samples
*
sizeof
(
*
alac
->
output_samples_buffer
[
0
]));
}
break
;
}
if
(
avpkt
->
size
*
8
-
get_bits_count
(
&
alac
->
gb
)
>
8
)
...
...
@@ -520,7 +532,8 @@ static av_cold int alac_decode_init(AVCodecContext * avctx)
switch
(
alac
->
sample_size
)
{
case
16
:
avctx
->
sample_fmt
=
AV_SAMPLE_FMT_S16
;
break
;
case
24
:
avctx
->
sample_fmt
=
AV_SAMPLE_FMT_S32
;
case
24
:
case
32
:
avctx
->
sample_fmt
=
AV_SAMPLE_FMT_S32
;
break
;
default:
av_log_ask_for_sample
(
avctx
,
"Sample depth %d is not supported.
\n
"
,
alac
->
sample_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