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
3a957df4
Commit
3a957df4
authored
Feb 25, 2008
by
Baptiste Coudurier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ima4 in aiff support
Originally committed as revision 12196 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
4a5b619d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
aiff.c
libavformat/aiff.c
+11
-3
No files found.
libavformat/aiff.c
View file @
3a957df4
...
@@ -37,6 +37,7 @@ static const AVCodecTag codec_aiff_tags[] = {
...
@@ -37,6 +37,7 @@ static const AVCodecTag codec_aiff_tags[] = {
{
CODEC_ID_GSM
,
MKTAG
(
'G'
,
'S'
,
'M'
,
' '
)
},
{
CODEC_ID_GSM
,
MKTAG
(
'G'
,
'S'
,
'M'
,
' '
)
},
{
CODEC_ID_ADPCM_G726
,
MKTAG
(
'G'
,
'7'
,
'2'
,
'6'
)
},
{
CODEC_ID_ADPCM_G726
,
MKTAG
(
'G'
,
'7'
,
'2'
,
'6'
)
},
{
CODEC_ID_PCM_S16LE
,
MKTAG
(
's'
,
'o'
,
'w'
,
't'
)
},
{
CODEC_ID_PCM_S16LE
,
MKTAG
(
's'
,
'o'
,
'w'
,
't'
)
},
{
CODEC_ID_ADPCM_IMA_QT
,
MKTAG
(
'i'
,
'm'
,
'a'
,
'4'
)
},
{
0
,
0
},
{
0
,
0
},
};
};
...
@@ -123,11 +124,17 @@ static unsigned int get_aiff_header(ByteIOContext *pb, AVCodecContext *codec,
...
@@ -123,11 +124,17 @@ static unsigned int get_aiff_header(ByteIOContext *pb, AVCodecContext *codec,
codec
->
codec_tag
=
get_le32
(
pb
);
codec
->
codec_tag
=
get_le32
(
pb
);
codec
->
codec_id
=
codec_get_id
(
codec_aiff_tags
,
codec
->
codec_tag
);
codec
->
codec_id
=
codec_get_id
(
codec_aiff_tags
,
codec
->
codec_tag
);
if
(
codec
->
codec_id
==
CODEC_ID_PCM_S16BE
)
{
switch
(
codec
->
codec_id
)
{
case
CODEC_ID_PCM_S16BE
:
codec
->
codec_id
=
aiff_codec_get_id
(
codec
->
bits_per_sample
);
codec
->
codec_id
=
aiff_codec_get_id
(
codec
->
bits_per_sample
);
codec
->
bits_per_sample
=
av_get_bits_per_sample
(
codec
->
codec_id
);
codec
->
bits_per_sample
=
av_get_bits_per_sample
(
codec
->
codec_id
);
break
;
case
CODEC_ID_ADPCM_IMA_QT
:
codec
->
block_align
=
34
*
codec
->
channels
;
break
;
default:
break
;
}
}
size
-=
4
;
size
-=
4
;
}
else
{
}
else
{
/* Need the codec type */
/* Need the codec type */
...
@@ -140,6 +147,7 @@ static unsigned int get_aiff_header(ByteIOContext *pb, AVCodecContext *codec,
...
@@ -140,6 +147,7 @@ static unsigned int get_aiff_header(ByteIOContext *pb, AVCodecContext *codec,
/* Block align needs to be computed in all cases, as the definition
/* Block align needs to be computed in all cases, as the definition
* is specific to applications -> here we use the WAVE format definition */
* is specific to applications -> here we use the WAVE format definition */
if
(
!
codec
->
block_align
)
codec
->
block_align
=
(
codec
->
bits_per_sample
*
codec
->
channels
)
>>
3
;
codec
->
block_align
=
(
codec
->
bits_per_sample
*
codec
->
channels
)
>>
3
;
codec
->
bit_rate
=
codec
->
sample_rate
*
(
codec
->
block_align
<<
3
);
codec
->
bit_rate
=
codec
->
sample_rate
*
(
codec
->
block_align
<<
3
);
...
...
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