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
6d721f71
Commit
6d721f71
authored
May 16, 2011
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix ff_mov_write_chan() so it can be used by other muxers.
parent
d2549ba9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
12 deletions
+7
-12
cafenc.c
libavformat/cafenc.c
+5
-1
isom.c
libavformat/isom.c
+1
-9
isom.h
libavformat/isom.h
+1
-2
No files found.
libavformat/cafenc.c
View file @
6d721f71
...
...
@@ -134,7 +134,11 @@ static int caf_write_header(AVFormatContext *s)
avio_wb32
(
pb
,
enc
->
channels
);
//< mChannelsPerFrame
avio_wb32
(
pb
,
enc
->
bits_per_coded_sample
);
//< mBitsPerChannel
ff_mov_write_chan
(
s
,
enc
->
channel_layout
,
"chan"
);
if
(
enc
->
channel_layout
)
{
ffio_wfourcc
(
pb
,
"chan"
);
avio_wb64
(
pb
,
12
);
ff_mov_write_chan
(
pb
,
enc
->
channel_layout
);
}
ffio_wfourcc
(
pb
,
"data"
);
//< Audio Data chunk
caf
->
data
=
avio_tell
(
pb
);
...
...
libavformat/isom.c
View file @
6d721f71
...
...
@@ -27,7 +27,6 @@
#include "internal.h"
#include "isom.h"
#include "riff.h"
#include "avio_internal.h"
#include "libavcodec/mpeg4audio.h"
#include "libavcodec/mpegaudiodata.h"
...
...
@@ -484,24 +483,17 @@ void ff_mov_read_chan(AVFormatContext *s, int64_t size, AVCodecContext *codec)
avio_skip
(
pb
,
8
);
}
void
ff_mov_write_chan
(
AVFormatContext
*
s
,
int64_t
channel_layout
,
const
char
*
chunk_type
)
void
ff_mov_write_chan
(
AVIOContext
*
pb
,
int64_t
channel_layout
)
{
AVIOContext
*
pb
=
s
->
pb
;
const
MovChannelLayout
*
layouts
;
uint32_t
layout_tag
=
0
;
if
(
!
channel_layout
)
return
;
for
(
layouts
=
mov_channel_layout
;
layouts
->
channel_layout
;
layouts
++
)
if
(
channel_layout
==
layouts
->
channel_layout
)
{
layout_tag
=
layouts
->
layout_tag
;
break
;
}
ffio_wfourcc
(
pb
,
chunk_type
);
avio_wb64
(
pb
,
12
);
//< mChunkSize
if
(
layout_tag
)
{
avio_wb32
(
pb
,
layout_tag
);
//< mChannelLayoutTag
avio_wb32
(
pb
,
0
);
//< mChannelBitmap
...
...
libavformat/isom.h
View file @
6d721f71
...
...
@@ -157,7 +157,6 @@ enum CodecID ff_mov_get_lpcm_codec_id(int bps, int flags);
int
ff_mov_read_stsd_entries
(
MOVContext
*
c
,
AVIOContext
*
pb
,
int
entries
);
void
ff_mov_read_chan
(
AVFormatContext
*
s
,
int64_t
size
,
AVCodecContext
*
codec
);
void
ff_mov_write_chan
(
AVFormatContext
*
s
,
int64_t
channel_layout
,
const
char
*
chunk_type
);
void
ff_mov_write_chan
(
AVIOContext
*
pb
,
int64_t
channel_layout
);
#endif
/* AVFORMAT_ISOM_H */
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