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
dd8a46d9
Commit
dd8a46d9
authored
Mar 02, 2007
by
Baptiste Coudurier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support for adpcm swf, pcm
Originally committed as revision 8189 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
01d193aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
swf.c
libavformat/swf.c
+14
-4
No files found.
libavformat/swf.c
View file @
dd8a46d9
...
@@ -86,6 +86,15 @@ static const AVCodecTag swf_codec_tags[] = {
...
@@ -86,6 +86,15 @@ static const AVCodecTag swf_codec_tags[] = {
{
0
,
0
},
{
0
,
0
},
};
};
static
const
AVCodecTag
swf_audio_codec_tags
[]
=
{
{
CODEC_ID_PCM_S16LE
,
0x00
},
{
CODEC_ID_ADPCM_SWF
,
0x01
},
{
CODEC_ID_MP3
,
0x02
},
{
CODEC_ID_PCM_S16LE
,
0x03
},
//{CODEC_ID_NELLYMOSER, 0x06},
{
0
,
0
},
};
static
const
int
sSampleRates
[
3
][
4
]
=
{
static
const
int
sSampleRates
[
3
][
4
]
=
{
{
44100
,
48000
,
32000
,
0
},
{
44100
,
48000
,
32000
,
0
},
{
22050
,
24000
,
16000
,
0
},
{
22050
,
24000
,
16000
,
0
},
...
@@ -797,8 +806,7 @@ static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap)
...
@@ -797,8 +806,7 @@ static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap)
swf
->
audio_stream_index
=
ast
->
index
;
swf
->
audio_stream_index
=
ast
->
index
;
ast
->
codec
->
channels
=
1
+
(
v
&
1
);
ast
->
codec
->
channels
=
1
+
(
v
&
1
);
ast
->
codec
->
codec_type
=
CODEC_TYPE_AUDIO
;
ast
->
codec
->
codec_type
=
CODEC_TYPE_AUDIO
;
if
(
v
&
0x20
)
ast
->
codec
->
codec_id
=
codec_get_id
(
swf_audio_codec_tags
,
(
v
>>
4
)
&
15
);
ast
->
codec
->
codec_id
=
CODEC_ID_MP3
;
ast
->
need_parsing
=
1
;
ast
->
need_parsing
=
1
;
sample_rate_code
=
(
v
>>
2
)
&
3
;
sample_rate_code
=
(
v
>>
2
)
&
3
;
if
(
!
sample_rate_code
)
if
(
!
sample_rate_code
)
...
@@ -856,9 +864,11 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -856,9 +864,11 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
if
(
st
->
codec
->
codec_id
==
CODEC_ID_MP3
)
{
if
(
st
->
codec
->
codec_id
==
CODEC_ID_MP3
)
{
url_fskip
(
pb
,
4
);
url_fskip
(
pb
,
4
);
av_get_packet
(
pb
,
pkt
,
len
-
4
);
av_get_packet
(
pb
,
pkt
,
len
-
4
);
pkt
->
stream_index
=
st
->
index
;
}
else
{
// ADPCM, PCM
return
pkt
->
size
;
av_get_packet
(
pb
,
pkt
,
len
)
;
}
}
pkt
->
stream_index
=
st
->
index
;
return
pkt
->
size
;
}
else
if
(
tag
==
TAG_JPEG2
)
{
}
else
if
(
tag
==
TAG_JPEG2
)
{
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
{
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
{
st
=
s
->
streams
[
i
];
st
=
s
->
streams
[
i
];
...
...
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