Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
9a630c25
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,发现更多精彩内容 >>
提交
9a630c25
编写于
9月 29, 2006
作者:
B
Baptiste Coudurier
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove useless casts
Originally committed as revision 6377 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
626a8fe7
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
13 addition
and
13 deletion
+13
-13
libavformat/mov.c
libavformat/mov.c
+13
-13
未找到文件。
libavformat/mov.c
浏览文件 @
9a630c25
...
...
@@ -491,7 +491,7 @@ static int mov_read_esds(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
len
=
mov_mp4_read_descr
(
pb
,
&
tag
);
if
(
tag
==
MP4DecSpecificDescrTag
)
{
dprintf
(
"Specific MPEG4 header len=%d
\n
"
,
len
);
st
->
codec
->
extradata
=
(
uint8_t
*
)
av_mallocz
(
len
+
FF_INPUT_BUFFER_PADDING_SIZE
);
st
->
codec
->
extradata
=
av_mallocz
(
len
+
FF_INPUT_BUFFER_PADDING_SIZE
);
if
(
st
->
codec
->
extradata
)
{
get_buffer
(
pb
,
st
->
codec
->
extradata
,
len
);
st
->
codec
->
extradata_size
=
len
;
...
...
@@ -645,7 +645,7 @@ static int mov_read_smi(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
// this should be fixed and just SMI header should be passed
av_free
(
st
->
codec
->
extradata
);
st
->
codec
->
extradata_size
=
0x5a
+
atom
.
size
;
st
->
codec
->
extradata
=
(
uint8_t
*
)
av_mallocz
(
st
->
codec
->
extradata_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
st
->
codec
->
extradata
=
av_mallocz
(
st
->
codec
->
extradata_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
if
(
st
->
codec
->
extradata
)
{
strcpy
(
st
->
codec
->
extradata
,
"SVQ3"
);
// fake
...
...
@@ -686,7 +686,7 @@ static int mov_read_alac(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
av_free
(
st
->
codec
->
extradata
);
st
->
codec
->
extradata_size
=
36
;
st
->
codec
->
extradata
=
(
uint8_t
*
)
av_mallocz
(
st
->
codec
->
extradata_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
st
->
codec
->
extradata
=
av_mallocz
(
st
->
codec
->
extradata_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
if
(
st
->
codec
->
extradata
)
{
strcpy
((
char
*
)
st
->
codec
->
extradata
+
4
,
"alac"
);
// fake
...
...
@@ -708,7 +708,7 @@ static int mov_read_wave(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
// pass all frma atom to codec, needed at least for QDM2
av_free
(
st
->
codec
->
extradata
);
st
->
codec
->
extradata_size
=
atom
.
size
;
st
->
codec
->
extradata
=
(
uint8_t
*
)
av_mallocz
(
st
->
codec
->
extradata_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
st
->
codec
->
extradata
=
av_mallocz
(
st
->
codec
->
extradata_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
if
(
st
->
codec
->
extradata
)
{
get_buffer
(
pb
,
st
->
codec
->
extradata
,
atom
.
size
);
...
...
@@ -731,7 +731,7 @@ static int mov_read_jp2h(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
av_free
(
st
->
codec
->
extradata
);
st
->
codec
->
extradata_size
=
atom
.
size
+
8
;
st
->
codec
->
extradata
=
(
uint8_t
*
)
av_mallocz
(
st
->
codec
->
extradata_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
st
->
codec
->
extradata
=
av_mallocz
(
st
->
codec
->
extradata_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
/* pass all jp2h atom to codec */
if
(
st
->
codec
->
extradata
)
{
...
...
@@ -752,7 +752,7 @@ static int mov_read_avcC(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
av_free
(
st
->
codec
->
extradata
);
st
->
codec
->
extradata_size
=
atom
.
size
;
st
->
codec
->
extradata
=
(
uint8_t
*
)
av_mallocz
(
st
->
codec
->
extradata_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
st
->
codec
->
extradata
=
av_mallocz
(
st
->
codec
->
extradata_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
if
(
st
->
codec
->
extradata
)
{
get_buffer
(
pb
,
st
->
codec
->
extradata
,
atom
.
size
);
...
...
@@ -777,7 +777,7 @@ static int mov_read_stco(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
return
-
1
;
sc
->
chunk_count
=
entries
;
sc
->
chunk_offsets
=
(
int64_t
*
)
av_malloc
(
entries
*
sizeof
(
int64_t
));
sc
->
chunk_offsets
=
av_malloc
(
entries
*
sizeof
(
int64_t
));
if
(
!
sc
->
chunk_offsets
)
return
-
1
;
if
(
atom
.
type
==
MKTAG
(
's'
,
't'
,
'c'
,
'o'
))
{
...
...
@@ -1096,7 +1096,7 @@ static int mov_read_stsc(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
av_log
(
NULL
,
AV_LOG_DEBUG
,
"track[%i].stsc.entries = %i
\n
"
,
c
->
fc
->
nb_streams
-
1
,
entries
);
#endif
sc
->
sample_to_chunk_sz
=
entries
;
sc
->
sample_to_chunk
=
(
MOV_sample_to_chunk_tbl
*
)
av_malloc
(
entries
*
sizeof
(
MOV_sample_to_chunk_tbl
));
sc
->
sample_to_chunk
=
av_malloc
(
entries
*
sizeof
(
MOV_sample_to_chunk_tbl
));
if
(
!
sc
->
sample_to_chunk
)
return
-
1
;
for
(
i
=
0
;
i
<
entries
;
i
++
)
{
...
...
@@ -1125,7 +1125,7 @@ static int mov_read_stss(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
#ifdef DEBUG
av_log
(
NULL
,
AV_LOG_DEBUG
,
"keyframe_count = %ld
\n
"
,
sc
->
keyframe_count
);
#endif
sc
->
keyframes
=
(
long
*
)
av_malloc
(
entries
*
sizeof
(
long
));
sc
->
keyframes
=
av_malloc
(
entries
*
sizeof
(
long
));
if
(
!
sc
->
keyframes
)
return
-
1
;
for
(
i
=
0
;
i
<
entries
;
i
++
)
{
...
...
@@ -1160,7 +1160,7 @@ static int mov_read_stsz(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
#ifdef DEBUG
av_log
(
NULL
,
AV_LOG_DEBUG
,
"sample_size = %ld sample_count = %ld
\n
"
,
sc
->
sample_size
,
sc
->
sample_count
);
#endif
sc
->
sample_sizes
=
(
long
*
)
av_malloc
(
entries
*
sizeof
(
long
));
sc
->
sample_sizes
=
av_malloc
(
entries
*
sizeof
(
long
));
if
(
!
sc
->
sample_sizes
)
return
-
1
;
for
(
i
=
0
;
i
<
entries
;
i
++
)
{
...
...
@@ -1260,7 +1260,7 @@ static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
st
=
av_new_stream
(
c
->
fc
,
c
->
fc
->
nb_streams
);
if
(
!
st
)
return
-
2
;
sc
=
(
MOVStreamContext
*
)
av_mallocz
(
sizeof
(
MOVStreamContext
));
sc
=
av_mallocz
(
sizeof
(
MOVStreamContext
));
if
(
!
sc
)
{
av_free
(
st
);
return
-
1
;
...
...
@@ -1368,10 +1368,10 @@ static int mov_read_cmov(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
moov_len
=
get_be32
(
pb
);
/* uncompressed size */
cmov_len
=
atom
.
size
-
6
*
4
;
cmov_data
=
(
uint8_t
*
)
av_malloc
(
cmov_len
);
cmov_data
=
av_malloc
(
cmov_len
);
if
(
!
cmov_data
)
return
-
1
;
moov_data
=
(
uint8_t
*
)
av_malloc
(
moov_len
);
moov_data
=
av_malloc
(
moov_len
);
if
(
!
moov_data
)
{
av_free
(
cmov_data
);
return
-
1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录