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
d50756cd
Commit
d50756cd
authored
Oct 11, 2006
by
Baptiste Coudurier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use av_get_bits_per_sample
Originally committed as revision 6645 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
e27d9277
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
19 deletions
+2
-19
aiff.c
libavformat/aiff.c
+2
-19
No files found.
libavformat/aiff.c
View file @
d50756cd
...
...
@@ -95,23 +95,6 @@ static void get_meta(ByteIOContext *pb, char * str, int strsize, int size)
url_fskip
(
pb
,
size
);
}
/* Returns the number of bits per second */
static
int
fix_bps
(
int
codec_id
)
{
switch
(
codec_id
)
{
case
CODEC_ID_PCM_S8
:
return
8
;
case
CODEC_ID_PCM_S16BE
:
return
16
;
case
CODEC_ID_PCM_S24BE
:
return
24
;
case
CODEC_ID_PCM_S32BE
:
return
32
;
}
return
-
1
;
}
/* Returns the number of sound data frames or negative on error */
static
unsigned
int
get_aiff_header
(
ByteIOContext
*
pb
,
AVCodecContext
*
codec
,
int
size
,
unsigned
version
)
...
...
@@ -141,14 +124,14 @@ static unsigned int get_aiff_header(ByteIOContext *pb, AVCodecContext *codec,
if
(
codec
->
codec_id
==
CODEC_ID_PCM_S16BE
)
{
codec
->
codec_id
=
aiff_codec_get_id
(
codec
->
bits_per_sample
);
codec
->
bits_per_sample
=
fix_bps
(
codec
->
codec_id
);
codec
->
bits_per_sample
=
av_get_bits_per_sample
(
codec
->
codec_id
);
}
size
-=
4
;
}
else
{
/* Need the codec type */
codec
->
codec_id
=
aiff_codec_get_id
(
codec
->
bits_per_sample
);
codec
->
bits_per_sample
=
fix_bps
(
codec
->
codec_id
);
codec
->
bits_per_sample
=
av_get_bits_per_sample
(
codec
->
codec_id
);
}
if
(
!
codec
->
codec_id
)
...
...
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