Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
fa26a29d
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,发现更多精彩内容 >>
提交
fa26a29d
编写于
8月 08, 2003
作者:
F
Fabrice Bellard
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add av_new_stream() usage
Originally committed as revision 2109 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
ee404803
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
19 deletion
+7
-19
libavformat/au.c
libavformat/au.c
+1
-8
libavformat/ffm.c
libavformat/ffm.c
+5
-7
libavformat/swf.c
libavformat/swf.c
+1
-4
未找到文件。
libavformat/au.c
浏览文件 @
fa26a29d
...
...
@@ -140,16 +140,9 @@ static int au_read_header(AVFormatContext *s,
}
/* now we are ready: build format streams */
st
=
av_
malloc
(
sizeof
(
AVStream
)
);
st
=
av_
new_stream
(
s
,
0
);
if
(
!
st
)
return
-
1
;
avcodec_get_context_defaults
(
&
st
->
codec
);
s
->
nb_streams
=
1
;
s
->
streams
[
0
]
=
st
;
st
->
id
=
0
;
st
->
codec
.
codec_type
=
CODEC_TYPE_AUDIO
;
st
->
codec
.
codec_tag
=
id
;
st
->
codec
.
codec_id
=
codec
;
...
...
libavformat/ffm.c
浏览文件 @
fa26a29d
...
...
@@ -368,7 +368,7 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap)
FFMStream
*
fst
;
ByteIOContext
*
pb
=
&
s
->
pb
;
AVCodecContext
*
codec
;
int
i
;
int
i
,
nb_streams
;
uint32_t
tag
;
/* header */
...
...
@@ -386,17 +386,15 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap)
ffm
->
file_size
=
(
uint64_t_C
(
1
)
<<
63
)
-
1
;
}
s
->
nb_streams
=
get_be32
(
pb
);
nb_streams
=
get_be32
(
pb
);
get_be32
(
pb
);
/* total bitrate */
/* read each stream */
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
{
for
(
i
=
0
;
i
<
nb_streams
;
i
++
)
{
char
rc_eq_buf
[
128
];
st
=
av_
mallocz
(
sizeof
(
AVStream
)
);
st
=
av_
new_stream
(
s
,
0
);
if
(
!
st
)
goto
fail
;
avcodec_get_context_defaults
(
&
st
->
codec
);
s
->
streams
[
i
]
=
st
;
fst
=
av_mallocz
(
sizeof
(
FFMStream
));
if
(
!
fst
)
goto
fail
;
...
...
@@ -611,7 +609,7 @@ offset_t ffm_read_write_index(int fd)
read
(
fd
,
buf
,
8
);
pos
=
0
;
for
(
i
=
0
;
i
<
8
;
i
++
)
pos
|=
buf
[
i
]
<<
(
56
-
i
*
8
);
pos
|=
(
int64_t
)
buf
[
i
]
<<
(
56
-
i
*
8
);
return
pos
;
}
...
...
libavformat/swf.c
浏览文件 @
fa26a29d
...
...
@@ -481,17 +481,14 @@ static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap)
get_le16
(
pb
);
/* if mp3 streaming found, OK */
if
((
v
&
0x20
)
!=
0
)
{
st
=
av_
mallocz
(
sizeof
(
AVStream
)
);
st
=
av_
new_stream
(
s
,
0
);
if
(
!
st
)
return
-
ENOMEM
;
avcodec_get_context_defaults
(
&
st
->
codec
);
if
(
v
&
0x01
)
st
->
codec
.
channels
=
2
;
else
st
->
codec
.
channels
=
1
;
s
->
nb_streams
=
1
;
s
->
streams
[
0
]
=
st
;
switch
((
v
>>
2
)
&
0x03
)
{
case
1
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录