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
b38b7cc3
Commit
b38b7cc3
authored
Mar 21, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aiffdec: factor out handling of integer PCM for AIFF-C and plain AIFF
parent
2c07c180
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
13 deletions
+8
-13
aiffdec.c
libavformat/aiffdec.c
+8
-13
No files found.
libavformat/aiffdec.c
View file @
b38b7cc3
...
...
@@ -110,17 +110,19 @@ static unsigned int get_aiff_header(AVFormatContext *s, int size,
codec
->
sample_rate
=
sample_rate
;
size
-=
18
;
/*
Got an AIFF-C?
*/
/*
get codec id for AIFF-C
*/
if
(
version
==
AIFF_C_VERSION1
)
{
codec
->
codec_tag
=
avio_rl32
(
pb
);
codec
->
codec_id
=
ff_codec_get_id
(
ff_codec_aiff_tags
,
codec
->
codec_tag
);
size
-=
4
;
}
switch
(
codec
->
codec_id
)
{
case
CODEC_ID_PCM_S16BE
:
if
(
version
!=
AIFF_C_VERSION1
||
codec
->
codec_id
==
CODEC_ID_PCM_S16BE
)
{
codec
->
codec_id
=
aiff_codec_get_id
(
codec
->
bits_per_coded_sample
);
codec
->
bits_per_coded_sample
=
av_get_bits_per_sample
(
codec
->
codec_id
);
aiff
->
block_duration
=
1
;
break
;
}
else
{
switch
(
codec
->
codec_id
)
{
case
CODEC_ID_ADPCM_IMA_QT
:
codec
->
block_align
=
34
*
codec
->
channels
;
break
;
...
...
@@ -139,16 +141,9 @@ static unsigned int get_aiff_header(AVFormatContext *s, int size,
default:
break
;
}
size
-=
4
;
if
(
codec
->
block_align
>
0
)
aiff
->
block_duration
=
av_get_audio_frame_duration
(
codec
,
codec
->
block_align
);
}
else
{
/* Need the codec type */
codec
->
codec_id
=
aiff_codec_get_id
(
codec
->
bits_per_coded_sample
);
codec
->
bits_per_coded_sample
=
av_get_bits_per_sample
(
codec
->
codec_id
);
aiff
->
block_duration
=
1
;
}
/* Block align needs to be computed in all cases, as the definition
...
...
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