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
624fb5f9
Commit
624fb5f9
authored
Feb 20, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/swfdec: support 8-bits PCM audio.
parent
9a0076f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
swfdec.c
libavformat/swfdec.c
+4
-1
No files found.
libavformat/swfdec.c
View file @
624fb5f9
...
@@ -140,7 +140,7 @@ static int swf_read_header(AVFormatContext *s)
...
@@ -140,7 +140,7 @@ static int swf_read_header(AVFormatContext *s)
static
AVStream
*
create_new_audio_stream
(
AVFormatContext
*
s
,
int
id
,
int
info
)
static
AVStream
*
create_new_audio_stream
(
AVFormatContext
*
s
,
int
id
,
int
info
)
{
{
int
sample_rate_code
;
int
sample_rate_code
,
sample_size_code
;
AVStream
*
ast
=
avformat_new_stream
(
s
,
NULL
);
AVStream
*
ast
=
avformat_new_stream
(
s
,
NULL
);
if
(
!
ast
)
if
(
!
ast
)
return
NULL
;
return
NULL
;
...
@@ -156,6 +156,9 @@ static AVStream *create_new_audio_stream(AVFormatContext *s, int id, int info)
...
@@ -156,6 +156,9 @@ static AVStream *create_new_audio_stream(AVFormatContext *s, int id, int info)
ast
->
codec
->
codec_id
=
ff_codec_get_id
(
swf_audio_codec_tags
,
info
>>
4
&
15
);
ast
->
codec
->
codec_id
=
ff_codec_get_id
(
swf_audio_codec_tags
,
info
>>
4
&
15
);
ast
->
need_parsing
=
AVSTREAM_PARSE_FULL
;
ast
->
need_parsing
=
AVSTREAM_PARSE_FULL
;
sample_rate_code
=
info
>>
2
&
3
;
sample_rate_code
=
info
>>
2
&
3
;
sample_size_code
=
info
>>
1
&
1
;
if
(
!
sample_size_code
&&
ast
->
codec
->
codec_id
==
AV_CODEC_ID_PCM_S16LE
)
ast
->
codec
->
codec_id
=
AV_CODEC_ID_PCM_U8
;
ast
->
codec
->
sample_rate
=
44100
>>
(
3
-
sample_rate_code
);
ast
->
codec
->
sample_rate
=
44100
>>
(
3
-
sample_rate_code
);
avpriv_set_pts_info
(
ast
,
64
,
1
,
ast
->
codec
->
sample_rate
);
avpriv_set_pts_info
(
ast
,
64
,
1
,
ast
->
codec
->
sample_rate
);
return
ast
;
return
ast
;
...
...
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