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
7c4b7d0f
Commit
7c4b7d0f
authored
Nov 29, 2009
by
Baptiste Coudurier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support pcm_f32/64le in mov
Originally committed as revision 20649 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
ba7c0ece
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
8 deletions
+14
-8
isom.c
libavformat/isom.c
+2
-0
movenc.c
libavformat/movenc.c
+12
-8
No files found.
libavformat/isom.c
View file @
7c4b7d0f
...
...
@@ -185,7 +185,9 @@ const AVCodecTag codec_movaudio_tags[] = {
{
CODEC_ID_PCM_S16LE
,
MKTAG
(
's'
,
'o'
,
'w'
,
't'
)
},
/* */
{
CODEC_ID_PCM_S16LE
,
MKTAG
(
'l'
,
'p'
,
'c'
,
'm'
)
},
{
CODEC_ID_PCM_F32BE
,
MKTAG
(
'f'
,
'l'
,
'3'
,
'2'
)
},
{
CODEC_ID_PCM_F32LE
,
MKTAG
(
'f'
,
'l'
,
'3'
,
'2'
)
},
{
CODEC_ID_PCM_F64BE
,
MKTAG
(
'f'
,
'l'
,
'6'
,
'4'
)
},
{
CODEC_ID_PCM_F64LE
,
MKTAG
(
'f'
,
'l'
,
'6'
,
'4'
)
},
{
CODEC_ID_PCM_S8
,
MKTAG
(
's'
,
'o'
,
'w'
,
't'
)
},
{
CODEC_ID_PCM_U8
,
MKTAG
(
'r'
,
'a'
,
'w'
,
' '
)
},
/* 8 bits unsigned */
{
CODEC_ID_PCM_U8
,
MKTAG
(
'N'
,
'O'
,
'N'
,
'E'
)
},
/* uncompressed */
...
...
libavformat/movenc.c
View file @
7c4b7d0f
...
...
@@ -360,6 +360,14 @@ static int mov_write_esds_tag(ByteIOContext *pb, MOVTrack *track) // Basic
return
updateSize
(
pb
,
pos
);
}
static
int
mov_pcm_le_gt16
(
enum
CodecID
codec_id
)
{
return
codec_id
==
CODEC_ID_PCM_S24LE
||
codec_id
==
CODEC_ID_PCM_S32LE
||
codec_id
==
CODEC_ID_PCM_F32LE
||
codec_id
==
CODEC_ID_PCM_F64LE
;
}
static
int
mov_write_wave_tag
(
ByteIOContext
*
pb
,
MOVTrack
*
track
)
{
int64_t
pos
=
url_ftell
(
pb
);
...
...
@@ -377,8 +385,7 @@ static int mov_write_wave_tag(ByteIOContext *pb, MOVTrack *track)
put_tag
(
pb
,
"mp4a"
);
put_be32
(
pb
,
0
);
mov_write_esds_tag
(
pb
,
track
);
}
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_PCM_S24LE
||
track
->
enc
->
codec_id
==
CODEC_ID_PCM_S32LE
)
{
}
else
if
(
mov_pcm_le_gt16
(
track
->
enc
->
codec_id
))
{
mov_write_enda_tag
(
pb
);
}
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_AMR_NB
)
{
mov_write_amr_tag
(
pb
,
track
);
...
...
@@ -442,9 +449,7 @@ static int mov_write_audio_tag(ByteIOContext *pb, MOVTrack *track)
if
(
mov_get_lpcm_flags
(
track
->
enc
->
codec_id
))
tag
=
AV_RL32
(
"lpcm"
);
version
=
2
;
}
else
if
(
track
->
audio_vbr
||
track
->
enc
->
codec_id
==
CODEC_ID_PCM_S32LE
||
track
->
enc
->
codec_id
==
CODEC_ID_PCM_S24LE
)
{
}
else
if
(
track
->
audio_vbr
||
mov_pcm_le_gt16
(
track
->
enc
->
codec_id
))
{
version
=
1
;
}
}
...
...
@@ -505,9 +510,8 @@ static int mov_write_audio_tag(ByteIOContext *pb, MOVTrack *track)
(
track
->
enc
->
codec_id
==
CODEC_ID_AAC
||
track
->
enc
->
codec_id
==
CODEC_ID_AC3
||
track
->
enc
->
codec_id
==
CODEC_ID_AMR_NB
||
track
->
enc
->
codec_id
==
CODEC_ID_PCM_S24LE
||
track
->
enc
->
codec_id
==
CODEC_ID_PCM_S32LE
||
track
->
enc
->
codec_id
==
CODEC_ID_ALAC
))
track
->
enc
->
codec_id
==
CODEC_ID_ALAC
||
mov_pcm_le_gt16
(
track
->
enc
->
codec_id
)))
mov_write_wave_tag
(
pb
,
track
);
else
if
(
track
->
tag
==
MKTAG
(
'm'
,
'p'
,
'4'
,
'a'
))
mov_write_esds_tag
(
pb
,
track
);
...
...
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