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
05a26730
Commit
05a26730
authored
Aug 22, 2011
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support more codecs when muxing caf.
parent
ba571f6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
3 deletions
+22
-3
cafenc.c
libavformat/cafenc.c
+22
-3
No files found.
libavformat/cafenc.c
View file @
05a26730
...
...
@@ -107,9 +107,6 @@ static int caf_write_header(AVFormatContext *s)
switch
(
enc
->
codec_id
)
{
case
CODEC_ID_AAC
:
case
CODEC_ID_AC3
:
case
CODEC_ID_ALAC
:
case
CODEC_ID_AMR_NB
:
case
CODEC_ID_QDM2
:
av_log
(
s
,
AV_LOG_ERROR
,
"muxing codec currently unsupported
\n
"
);
return
AVERROR_PATCHWELCOME
;
}
...
...
@@ -161,6 +158,28 @@ static int caf_write_header(AVFormatContext *s)
ff_mov_write_chan
(
pb
,
enc
->
channel_layout
);
}
if
(
enc
->
codec_id
==
CODEC_ID_ALAC
)
{
ffio_wfourcc
(
pb
,
"kuki"
);
avio_wb64
(
pb
,
12
+
enc
->
extradata_size
);
avio_write
(
pb
,
"
\0\0\0\14
frmaalac"
,
12
);
avio_write
(
pb
,
enc
->
extradata
,
enc
->
extradata_size
);
}
else
if
(
enc
->
codec_id
==
CODEC_ID_AMR_NB
)
{
ffio_wfourcc
(
pb
,
"kuki"
);
avio_wb64
(
pb
,
29
);
avio_write
(
pb
,
"
\0\0\0\14
frmasamr"
,
12
);
avio_wb32
(
pb
,
0x11
);
/* size */
avio_write
(
pb
,
"samrFFMP"
,
8
);
avio_w8
(
pb
,
0
);
/* decoder version */
avio_wb16
(
pb
,
0x81FF
);
/* Mode set (all modes for AMR_NB) */
avio_w8
(
pb
,
0x00
);
/* Mode change period (no restriction) */
avio_w8
(
pb
,
0x01
);
/* Frames per sample */
}
else
if
(
enc
->
codec_id
==
CODEC_ID_QDM2
)
{
ffio_wfourcc
(
pb
,
"kuki"
);
avio_wb64
(
pb
,
enc
->
extradata_size
);
avio_write
(
pb
,
enc
->
extradata
,
enc
->
extradata_size
);
}
ffio_wfourcc
(
pb
,
"data"
);
//< Audio Data chunk
caf
->
data
=
avio_tell
(
pb
);
avio_wb64
(
pb
,
-
1
);
//< mChunkSize
...
...
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