Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
c3e92a6c
F
Ffmpeg
项目概览
小白菜888
/
Ffmpeg
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Ffmpeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c3e92a6c
编写于
12月 11, 2008
作者:
B
Baptiste Coudurier
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove _t in typedef for POSIX compatibility
Originally committed as revision 16063 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
7dfea342
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
56 addition
and
56 deletion
+56
-56
libavformat/isom.h
libavformat/isom.h
+1
-1
libavformat/mov.c
libavformat/mov.c
+53
-53
libavformat/movenc.c
libavformat/movenc.c
+2
-2
未找到文件。
libavformat/isom.h
浏览文件 @
c3e92a6c
...
...
@@ -38,6 +38,6 @@ int ff_mov_lang_to_iso639(int code, char *to);
typedef
struct
{
int
count
;
int
duration
;
}
MOV
_stts_t
;
}
MOV
Stts
;
#endif
/* AVFORMAT_ISOM_H */
libavformat/mov.c
浏览文件 @
c3e92a6c
...
...
@@ -69,18 +69,18 @@ typedef struct {
int
first
;
int
count
;
int
id
;
}
MOV
_stsc_t
;
}
MOV
Stsc
;
typedef
struct
{
uint32_t
type
;
char
*
path
;
}
MOV
_dref_t
;
}
MOV
Dref
;
typedef
struct
{
uint32_t
type
;
int64_t
offset
;
int64_t
size
;
/* total size (excluding the size and type fields) */
}
MOV
_atom_t
;
}
MOV
Atom
;
struct
MOVParseTableEntry
;
...
...
@@ -109,12 +109,12 @@ typedef struct MOVStreamContext {
unsigned
int
chunk_count
;
int64_t
*
chunk_offsets
;
unsigned
int
stts_count
;
MOV
_stts_t
*
stts_data
;
MOV
Stts
*
stts_data
;
unsigned
int
ctts_count
;
MOV
_stts_t
*
ctts_data
;
MOV
Stts
*
ctts_data
;
unsigned
int
edit_count
;
/* number of 'edit' (elst atom) */
unsigned
int
sample_to_chunk_sz
;
MOV
_stsc_t
*
sample_to_chunk
;
MOV
Stsc
*
sample_to_chunk
;
int
sample_to_ctime_index
;
int
sample_to_ctime_sample
;
unsigned
int
sample_size
;
...
...
@@ -131,7 +131,7 @@ typedef struct MOVStreamContext {
int
pseudo_stream_id
;
///< -1 means demux all ids
int16_t
audio_cid
;
///< stsd audio compression id
unsigned
drefs_count
;
MOV
_dref_t
*
drefs
;
MOV
Dref
*
drefs
;
int
dref_id
;
int
wrong_dts
;
///< dts are wrong due to negative ctts
}
MOVStreamContext
;
...
...
@@ -163,15 +163,15 @@ typedef struct MOVContext {
/* links atom IDs to parse functions */
typedef
struct
MOVParseTableEntry
{
uint32_t
type
;
int
(
*
parse
)(
MOVContext
*
ctx
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
);
int
(
*
parse
)(
MOVContext
*
ctx
,
ByteIOContext
*
pb
,
MOV
Atom
atom
);
}
MOVParseTableEntry
;
static
const
MOVParseTableEntry
mov_default_parse_table
[];
static
int
mov_read_default
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_default
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
int64_t
total_size
=
0
;
MOV
_atom_t
a
;
MOV
Atom
a
;
int
i
;
int
err
=
0
;
...
...
@@ -232,7 +232,7 @@ static int mov_read_default(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
return
err
;
}
static
int
mov_read_dref
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_dref
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
AVStream
*
st
=
c
->
fc
->
streams
[
c
->
fc
->
nb_streams
-
1
];
MOVStreamContext
*
sc
=
st
->
priv_data
;
...
...
@@ -246,7 +246,7 @@ static int mov_read_dref(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
sc
->
drefs
=
av_mallocz
(
entries
*
sizeof
(
*
sc
->
drefs
));
for
(
i
=
0
;
i
<
sc
->
drefs_count
;
i
++
)
{
MOV
_dref_t
*
dref
=
&
sc
->
drefs
[
i
];
MOV
Dref
*
dref
=
&
sc
->
drefs
[
i
];
uint32_t
size
=
get_be32
(
pb
);
int64_t
next
=
url_ftell
(
pb
)
+
size
-
4
;
...
...
@@ -300,7 +300,7 @@ static int mov_read_dref(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
return
0
;
}
static
int
mov_read_hdlr
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_hdlr
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
AVStream
*
st
=
c
->
fc
->
streams
[
c
->
fc
->
nb_streams
-
1
];
uint32_t
type
;
...
...
@@ -373,7 +373,7 @@ static const AVCodecTag mp4_audio_types[] = {
{
CODEC_ID_NONE
,
0
},
};
static
int
mov_read_esds
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_esds
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
AVStream
*
st
=
c
->
fc
->
streams
[
c
->
fc
->
nb_streams
-
1
];
int
tag
,
len
;
...
...
@@ -431,7 +431,7 @@ static int mov_read_esds(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
}
/* this atom contains actual media data */
static
int
mov_read_mdat
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_mdat
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
if
(
atom
.
size
==
0
)
/* wrong one (MP4) */
return
0
;
...
...
@@ -439,7 +439,7 @@ static int mov_read_mdat(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
return
0
;
/* now go for moov */
}
static
int
mov_read_ftyp
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_ftyp
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
uint32_t
type
=
get_le32
(
pb
);
...
...
@@ -452,7 +452,7 @@ static int mov_read_ftyp(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
}
/* this atom should contain all header atoms */
static
int
mov_read_moov
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_moov
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
if
(
mov_read_default
(
c
,
pb
,
atom
)
<
0
)
return
-
1
;
...
...
@@ -462,14 +462,14 @@ static int mov_read_moov(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
return
0
;
/* now go for mdat */
}
static
int
mov_read_moof
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_moof
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
c
->
fragment
.
moof_offset
=
url_ftell
(
pb
)
-
8
;
dprintf
(
c
->
fc
,
"moof offset %llx
\n
"
,
c
->
fragment
.
moof_offset
);
return
mov_read_default
(
c
,
pb
,
atom
);
}
static
int
mov_read_mdhd
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_mdhd
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
AVStream
*
st
=
c
->
fc
->
streams
[
c
->
fc
->
nb_streams
-
1
];
MOVStreamContext
*
sc
=
st
->
priv_data
;
...
...
@@ -498,7 +498,7 @@ static int mov_read_mdhd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
return
0
;
}
static
int
mov_read_mvhd
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_mvhd
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
int
version
=
get_byte
(
pb
);
/* version */
get_be24
(
pb
);
/* flags */
...
...
@@ -534,7 +534,7 @@ static int mov_read_mvhd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
return
0
;
}
static
int
mov_read_smi
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_smi
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
AVStream
*
st
=
c
->
fc
->
streams
[
c
->
fc
->
nb_streams
-
1
];
...
...
@@ -554,7 +554,7 @@ static int mov_read_smi(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
return
0
;
}
static
int
mov_read_enda
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_enda
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
AVStream
*
st
=
c
->
fc
->
streams
[
c
->
fc
->
nb_streams
-
1
];
int
little_endian
=
get_be16
(
pb
);
...
...
@@ -581,7 +581,7 @@ static int mov_read_enda(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
}
/* FIXME modify qdm2/svq3/h264 decoders to take full atom as extradata */
static
int
mov_read_extradata
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_extradata
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
AVStream
*
st
=
c
->
fc
->
streams
[
c
->
fc
->
nb_streams
-
1
];
uint64_t
size
=
(
uint64_t
)
st
->
codec
->
extradata_size
+
atom
.
size
+
8
+
FF_INPUT_BUFFER_PADDING_SIZE
;
...
...
@@ -600,7 +600,7 @@ static int mov_read_extradata(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
return
0
;
}
static
int
mov_read_wave
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_wave
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
AVStream
*
st
=
c
->
fc
->
streams
[
c
->
fc
->
nb_streams
-
1
];
...
...
@@ -627,7 +627,7 @@ static int mov_read_wave(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
* This function reads atom content and puts data in extradata without tag
* nor size unlike mov_read_extradata.
*/
static
int
mov_read_glbl
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_glbl
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
AVStream
*
st
=
c
->
fc
->
streams
[
c
->
fc
->
nb_streams
-
1
];
...
...
@@ -643,7 +643,7 @@ static int mov_read_glbl(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
return
0
;
}
static
int
mov_read_stco
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_stco
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
AVStream
*
st
=
c
->
fc
->
streams
[
c
->
fc
->
nb_streams
-
1
];
MOVStreamContext
*
sc
=
st
->
priv_data
;
...
...
@@ -708,7 +708,7 @@ static enum CodecID mov_get_lpcm_codec_id(int bps, int flags)
return
CODEC_ID_NONE
;
}
static
int
mov_read_stsd
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_stsd
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
AVStream
*
st
=
c
->
fc
->
streams
[
c
->
fc
->
nb_streams
-
1
];
MOVStreamContext
*
sc
=
st
->
priv_data
;
...
...
@@ -723,7 +723,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
//Parsing Sample description table
enum
CodecID
id
;
int
dref_id
;
MOV
_atom_t
a
=
{
0
,
0
,
0
};
MOV
Atom
a
=
{
0
,
0
,
0
};
int64_t
start_pos
=
url_ftell
(
pb
);
int
size
=
get_be32
(
pb
);
/* size */
uint32_t
format
=
get_le32
(
pb
);
/* data format */
...
...
@@ -1022,7 +1022,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
return
0
;
}
static
int
mov_read_stsc
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_stsc
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
AVStream
*
st
=
c
->
fc
->
streams
[
c
->
fc
->
nb_streams
-
1
];
MOVStreamContext
*
sc
=
st
->
priv_data
;
...
...
@@ -1033,13 +1033,13 @@ static int mov_read_stsc(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
entries
=
get_be32
(
pb
);
if
(
entries
>=
UINT_MAX
/
sizeof
(
MOV_stsc_t
))
if
(
entries
>=
UINT_MAX
/
sizeof
(
*
sc
->
sample_to_chunk
))
return
-
1
;
dprintf
(
c
->
fc
,
"track[%i].stsc.entries = %i
\n
"
,
c
->
fc
->
nb_streams
-
1
,
entries
);
sc
->
sample_to_chunk_sz
=
entries
;
sc
->
sample_to_chunk
=
av_malloc
(
entries
*
sizeof
(
MOV_stsc_t
));
sc
->
sample_to_chunk
=
av_malloc
(
entries
*
sizeof
(
*
sc
->
sample_to_chunk
));
if
(
!
sc
->
sample_to_chunk
)
return
-
1
;
for
(
i
=
0
;
i
<
entries
;
i
++
)
{
...
...
@@ -1050,7 +1050,7 @@ static int mov_read_stsc(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
return
0
;
}
static
int
mov_read_stss
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_stss
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
AVStream
*
st
=
c
->
fc
->
streams
[
c
->
fc
->
nb_streams
-
1
];
MOVStreamContext
*
sc
=
st
->
priv_data
;
...
...
@@ -1078,7 +1078,7 @@ static int mov_read_stss(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
return
0
;
}
static
int
mov_read_stsz
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_stsz
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
AVStream
*
st
=
c
->
fc
->
streams
[
c
->
fc
->
nb_streams
-
1
];
MOVStreamContext
*
sc
=
st
->
priv_data
;
...
...
@@ -1108,7 +1108,7 @@ static int mov_read_stsz(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
return
0
;
}
static
int
mov_read_stts
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_stts
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
AVStream
*
st
=
c
->
fc
->
streams
[
c
->
fc
->
nb_streams
-
1
];
MOVStreamContext
*
sc
=
st
->
priv_data
;
...
...
@@ -1119,11 +1119,11 @@ static int mov_read_stts(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
get_byte
(
pb
);
/* version */
get_be24
(
pb
);
/* flags */
entries
=
get_be32
(
pb
);
if
(
entries
>=
UINT_MAX
/
sizeof
(
MOV_stts_t
))
if
(
entries
>=
UINT_MAX
/
sizeof
(
*
sc
->
stts_data
))
return
-
1
;
sc
->
stts_count
=
entries
;
sc
->
stts_data
=
av_malloc
(
entries
*
sizeof
(
MOV_stts_t
));
sc
->
stts_data
=
av_malloc
(
entries
*
sizeof
(
*
sc
->
stts_data
));
if
(
!
sc
->
stts_data
)
return
-
1
;
dprintf
(
c
->
fc
,
"track[%i].stts.entries = %i
\n
"
,
c
->
fc
->
nb_streams
-
1
,
entries
);
...
...
@@ -1153,7 +1153,7 @@ static int mov_read_stts(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
return
0
;
}
static
int
mov_read_ctts
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_ctts
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
AVStream
*
st
=
c
->
fc
->
streams
[
c
->
fc
->
nb_streams
-
1
];
MOVStreamContext
*
sc
=
st
->
priv_data
;
...
...
@@ -1162,11 +1162,11 @@ static int mov_read_ctts(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
get_byte
(
pb
);
/* version */
get_be24
(
pb
);
/* flags */
entries
=
get_be32
(
pb
);
if
(
entries
>=
UINT_MAX
/
sizeof
(
MOV_stts_t
))
if
(
entries
>=
UINT_MAX
/
sizeof
(
*
sc
->
ctts_data
))
return
-
1
;
sc
->
ctts_count
=
entries
;
sc
->
ctts_data
=
av_malloc
(
entries
*
sizeof
(
MOV_stts_t
));
sc
->
ctts_data
=
av_malloc
(
entries
*
sizeof
(
*
sc
->
ctts_data
));
if
(
!
sc
->
ctts_data
)
return
-
1
;
dprintf
(
c
->
fc
,
"track[%i].ctts.entries = %i
\n
"
,
c
->
fc
->
nb_streams
-
1
,
entries
);
...
...
@@ -1295,7 +1295,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
sc
->
sample_count
=
st
->
nb_index_entries
;
}
static
int
mov_read_trak
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_trak
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
AVStream
*
st
;
MOVStreamContext
*
sc
;
...
...
@@ -1370,7 +1370,7 @@ static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
return
0
;
}
static
int
mov_read_ilst
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_ilst
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
int
ret
;
c
->
itunes_metadata
=
1
;
...
...
@@ -1379,14 +1379,14 @@ static int mov_read_ilst(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
return
ret
;
}
static
int
mov_read_meta
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_meta
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
url_fskip
(
pb
,
4
);
// version + flags
atom
.
size
-=
4
;
return
mov_read_default
(
c
,
pb
,
atom
);
}
static
int
mov_read_trkn
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_trkn
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
get_be32
(
pb
);
// type
get_be32
(
pb
);
// unknown
...
...
@@ -1395,7 +1395,7 @@ static int mov_read_trkn(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
return
0
;
}
static
int
mov_read_udta_string
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_udta_string
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
char
*
str
=
NULL
;
int
size
;
...
...
@@ -1434,7 +1434,7 @@ static int mov_read_udta_string(MOVContext *c, ByteIOContext *pb, MOV_atom_t ato
return
0
;
}
static
int
mov_read_tkhd
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_tkhd
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
int
i
;
int
width
;
...
...
@@ -1505,7 +1505,7 @@ static int mov_read_tkhd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
return
0
;
}
static
int
mov_read_tfhd
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_tfhd
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
MOVFragment
*
frag
=
&
c
->
fragment
;
MOVTrackExt
*
trex
=
NULL
;
...
...
@@ -1540,7 +1540,7 @@ static int mov_read_tfhd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
return
0
;
}
static
int
mov_read_trex
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_trex
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
MOVTrackExt
*
trex
;
...
...
@@ -1560,7 +1560,7 @@ static int mov_read_trex(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
return
0
;
}
static
int
mov_read_trun
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_trun
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
MOVFragment
*
frag
=
&
c
->
fragment
;
AVStream
*
st
;
...
...
@@ -1631,7 +1631,7 @@ static int mov_read_trun(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
/* this atom should be null (from specs), but some buggy files put the 'moov' atom inside it... */
/* like the files created with Adobe Premiere 5.0, for samples see */
/* http://graphics.tudelft.nl/~wouter/publications/soundtests/ */
static
int
mov_read_wide
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_wide
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
int
err
;
...
...
@@ -1652,7 +1652,7 @@ static int mov_read_wide(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
return
err
;
}
static
int
mov_read_cmov
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_cmov
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
#ifdef CONFIG_ZLIB
ByteIOContext
ctx
;
...
...
@@ -1705,7 +1705,7 @@ free_and_return:
}
/* edit list atom */
static
int
mov_read_elst
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
_atom_t
atom
)
static
int
mov_read_elst
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOV
Atom
atom
)
{
MOVStreamContext
*
sc
=
c
->
fc
->
streams
[
c
->
fc
->
nb_streams
-
1
]
->
priv_data
;
int
i
,
edit_count
;
...
...
@@ -1834,7 +1834,7 @@ static int mov_read_header(AVFormatContext *s, AVFormatParameters *ap)
MOVContext
*
mov
=
s
->
priv_data
;
ByteIOContext
*
pb
=
s
->
pb
;
int
err
;
MOV
_atom_t
atom
=
{
0
,
0
,
0
};
MOV
Atom
atom
=
{
0
,
0
,
0
};
mov
->
fc
=
s
;
/* .mov and .mp4 aren't streamable anyway (only progressive download if moov is before mdat) */
...
...
@@ -1887,7 +1887,7 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
if
(
!
sample
)
{
mov
->
found_mdat
=
0
;
if
(
!
url_is_streamed
(
s
->
pb
)
||
mov_read_default
(
mov
,
s
->
pb
,
(
MOV
_atom_t
){
0
,
0
,
INT64_MAX
})
<
0
||
mov_read_default
(
mov
,
s
->
pb
,
(
MOV
Atom
){
0
,
0
,
INT64_MAX
})
<
0
||
url_feof
(
s
->
pb
))
return
-
1
;
dprintf
(
s
,
"read fragments, offset 0x%llx
\n
"
,
url_ftell
(
s
->
pb
));
...
...
libavformat/movenc.c
浏览文件 @
c3e92a6c
...
...
@@ -723,7 +723,7 @@ static int mov_write_stsd_tag(ByteIOContext *pb, MOVTrack *track)
static
int
mov_write_ctts_tag
(
ByteIOContext
*
pb
,
MOVTrack
*
track
)
{
MOV
_stts_t
*
ctts_entries
;
MOV
Stts
*
ctts_entries
;
uint32_t
entries
=
0
;
uint32_t
atom_size
;
int
i
;
...
...
@@ -757,7 +757,7 @@ static int mov_write_ctts_tag(ByteIOContext *pb, MOVTrack *track)
/* Time to sample atom */
static
int
mov_write_stts_tag
(
ByteIOContext
*
pb
,
MOVTrack
*
track
)
{
MOV
_stts_t
*
stts_entries
;
MOV
Stts
*
stts_entries
;
uint32_t
entries
=
-
1
;
uint32_t
atom_size
;
int
i
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录