Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
d2bc4da1
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,发现更多精彩内容 >>
提交
d2bc4da1
编写于
5月 22, 2011
作者:
A
Anton Khirnov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ffmpeg: purge redundant AVInputStream.index.
AVStream.index stores the same thing.
上级
d20576d0
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
10 deletion
+8
-10
ffmpeg.c
ffmpeg.c
+8
-10
未找到文件。
ffmpeg.c
浏览文件 @
d2bc4da1
...
...
@@ -307,7 +307,6 @@ static int nb_output_streams_for_file[MAX_FILES] = { 0 };
typedef
struct
AVInputStream
{
int
file_index
;
int
index
;
AVStream
*
st
;
int
discard
;
/* true if stream data should be discarded */
int
decoding_needed
;
/* true if the packets must be decoded in 'raw_fifo' */
...
...
@@ -802,7 +801,7 @@ need_realloc:
if
((
ost
->
audio_resample
&&
!
ost
->
resample
)
||
resample_changed
)
{
if
(
resample_changed
)
{
av_log
(
NULL
,
AV_LOG_INFO
,
"Input stream #%d.%d frame changed from rate:%d fmt:%s ch:%d to rate:%d fmt:%s ch:%d
\n
"
,
ist
->
file_index
,
ist
->
index
,
ist
->
file_index
,
ist
->
st
->
index
,
ost
->
resample_sample_rate
,
av_get_sample_fmt_name
(
ost
->
resample_sample_fmt
),
ost
->
resample_channels
,
dec
->
sample_rate
,
av_get_sample_fmt_name
(
dec
->
sample_fmt
),
dec
->
channels
);
ost
->
resample_sample_fmt
=
dec
->
sample_fmt
;
...
...
@@ -1165,7 +1164,7 @@ static void do_video_out(AVFormatContext *s,
if
(
resample_changed
)
{
av_log
(
NULL
,
AV_LOG_INFO
,
"Input stream #%d.%d frame changed from size:%dx%d fmt:%s to size:%dx%d fmt:%s
\n
"
,
ist
->
file_index
,
ist
->
index
,
ist
->
file_index
,
ist
->
st
->
index
,
ost
->
resample_width
,
ost
->
resample_height
,
avcodec_get_pix_fmt_name
(
ost
->
resample_pix_fmt
),
dec
->
width
,
dec
->
height
,
avcodec_get_pix_fmt_name
(
dec
->
pix_fmt
));
if
(
!
ost
->
video_resample
)
...
...
@@ -1974,7 +1973,6 @@ static int transcode(AVFormatContext **output_files,
ist
=
ist_table
[
j
++
];
ist
->
st
=
is
->
streams
[
k
];
ist
->
file_index
=
i
;
ist
->
index
=
k
;
ist
->
discard
=
1
;
/* the stream is discarded by default
(changed later) */
...
...
@@ -2345,7 +2343,7 @@ static int transcode(AVFormatContext **output_files,
codec
=
avcodec_find_decoder
(
ist
->
st
->
codec
->
codec_id
);
if
(
!
codec
)
{
snprintf
(
error
,
sizeof
(
error
),
"Decoder (codec id %d) not found for input stream #%d.%d"
,
ist
->
st
->
codec
->
codec_id
,
ist
->
file_index
,
ist
->
index
);
ist
->
st
->
codec
->
codec_id
,
ist
->
file_index
,
ist
->
st
->
index
);
ret
=
AVERROR
(
EINVAL
);
goto
dump_format
;
}
...
...
@@ -2362,7 +2360,7 @@ static int transcode(AVFormatContext **output_files,
if
(
avcodec_open
(
ist
->
st
->
codec
,
codec
)
<
0
)
{
snprintf
(
error
,
sizeof
(
error
),
"Error while opening decoder for input stream #%d.%d"
,
ist
->
file_index
,
ist
->
index
);
ist
->
file_index
,
ist
->
st
->
index
);
ret
=
AVERROR
(
EINVAL
);
goto
dump_format
;
}
...
...
@@ -2498,13 +2496,13 @@ static int transcode(AVFormatContext **output_files,
ost
=
ost_table
[
i
];
fprintf
(
stderr
,
" Stream #%d.%d -> #%d.%d"
,
ist_table
[
ost
->
source_index
]
->
file_index
,
ist_table
[
ost
->
source_index
]
->
index
,
ist_table
[
ost
->
source_index
]
->
st
->
index
,
ost
->
file_index
,
ost
->
index
);
if
(
ost
->
sync_ist
!=
ist_table
[
ost
->
source_index
])
fprintf
(
stderr
,
" [sync #%d.%d]"
,
ost
->
sync_ist
->
file_index
,
ost
->
sync_ist
->
index
);
ost
->
sync_ist
->
st
->
index
);
fprintf
(
stderr
,
"
\n
"
);
}
}
...
...
@@ -2643,12 +2641,12 @@ static int transcode(AVFormatContext **output_files,
goto
discard_packet
;
}
//fprintf(stderr,"read #%d.%d size=%d\n", ist->file_index, ist->index, pkt.size);
//fprintf(stderr,"read #%d.%d size=%d\n", ist->file_index, ist->
st->
index, pkt.size);
if
(
output_packet
(
ist
,
ist_index
,
ost_table
,
nb_ostreams
,
&
pkt
)
<
0
)
{
if
(
verbose
>=
0
)
fprintf
(
stderr
,
"Error while decoding stream #%d.%d
\n
"
,
ist
->
file_index
,
ist
->
index
);
ist
->
file_index
,
ist
->
st
->
index
);
if
(
exit_on_error
)
ffmpeg_exit
(
1
);
av_free_packet
(
&
pkt
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录