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
4d677c7a
Commit
4d677c7a
authored
Sep 15, 2016
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/msf: add support for ATRAC3 codec
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
02226027
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
msf.c
libavformat/msf.c
+12
-0
No files found.
libavformat/msf.c
View file @
4d677c7a
...
...
@@ -44,6 +44,7 @@ static int msf_read_header(AVFormatContext *s)
{
unsigned
codec
,
align
,
size
;
AVStream
*
st
;
int
ret
;
avio_skip
(
s
->
pb
,
4
);
...
...
@@ -68,6 +69,17 @@ static int msf_read_header(AVFormatContext *s)
case
0
:
st
->
codecpar
->
codec_id
=
AV_CODEC_ID_PCM_S16BE
;
break
;
case
3
:
st
->
codecpar
->
block_align
=
16
*
st
->
codecpar
->
channels
;
st
->
codecpar
->
codec_id
=
AV_CODEC_ID_ADPCM_PSX
;
break
;
case
4
:
case
5
:
case
6
:
st
->
codecpar
->
block_align
=
(
codec
==
4
?
96
:
codec
==
5
?
152
:
192
)
*
st
->
codecpar
->
channels
;
ret
=
ff_alloc_extradata
(
st
->
codecpar
,
14
);
if
(
ret
<
0
)
return
ret
;
memset
(
st
->
codecpar
->
extradata
,
0
,
st
->
codecpar
->
extradata_size
);
AV_WL16
(
st
->
codecpar
->
extradata
,
1
);
AV_WL16
(
st
->
codecpar
->
extradata
+
4
,
4096
);
AV_WL16
(
st
->
codecpar
->
extradata
+
10
,
1
);
st
->
codecpar
->
codec_id
=
AV_CODEC_ID_ATRAC3
;
break
;
case
7
:
st
->
need_parsing
=
AVSTREAM_PARSE_FULL_RAW
;
st
->
codecpar
->
codec_id
=
AV_CODEC_ID_MP3
;
break
;
default:
...
...
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