Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
428c59d9
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,发现更多精彩内容 >>
提交
428c59d9
编写于
8月 13, 2011
作者:
K
Kostya
提交者:
Anton Khirnov
8月 15, 2011
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
avtools: reinitialise filter chain when input video stream changes dimensions
Signed-off-by:
N
Anton Khirnov
<
anton@khirnov.net
>
上级
24efdea7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
27 addition
and
0 deletion
+27
-0
avconv.c
avconv.c
+13
-0
avplay.c
avplay.c
+14
-0
未找到文件。
avconv.c
浏览文件 @
428c59d9
...
...
@@ -1211,7 +1211,20 @@ static void do_video_out(AVFormatContext *s,
sws_scale
(
ost
->
img_resample_ctx
,
formatted_picture
->
data
,
formatted_picture
->
linesize
,
0
,
ost
->
resample_height
,
final_picture
->
data
,
final_picture
->
linesize
);
}
#else
if
(
resample_changed
)
{
avfilter_graph_free
(
&
ost
->
graph
);
if
(
configure_video_filters
(
ist
,
ost
))
{
fprintf
(
stderr
,
"Error reinitialising filters!
\n
"
);
exit_program
(
1
);
}
}
#endif
if
(
resample_changed
)
{
ost
->
resample_width
=
dec
->
width
;
ost
->
resample_height
=
dec
->
height
;
ost
->
resample_pix_fmt
=
dec
->
pix_fmt
;
}
/* duplicates frame if needed */
for
(
i
=
0
;
i
<
nb_frames
;
i
++
)
{
...
...
avplay.c
浏览文件 @
428c59d9
...
...
@@ -1755,6 +1755,8 @@ static int video_thread(void *arg)
AVFilterGraph
*
graph
=
avfilter_graph_alloc
();
AVFilterContext
*
filt_out
=
NULL
;
int64_t
pos
;
int
last_w
=
is
->
video_st
->
codec
->
width
;
int
last_h
=
is
->
video_st
->
codec
->
height
;
if
((
ret
=
configure_video_filters
(
graph
,
is
,
vfilters
))
<
0
)
goto
the_end
;
...
...
@@ -1771,6 +1773,18 @@ static int video_thread(void *arg)
while
(
is
->
paused
&&
!
is
->
videoq
.
abort_request
)
SDL_Delay
(
10
);
#if CONFIG_AVFILTER
if
(
last_w
!=
is
->
video_st
->
codec
->
width
||
last_h
!=
is
->
video_st
->
codec
->
height
)
{
av_dlog
(
NULL
,
"Changing size %dx%d -> %dx%d
\n
"
,
last_w
,
last_h
,
is
->
video_st
->
codec
->
width
,
is
->
video_st
->
codec
->
height
);
avfilter_graph_free
(
&
graph
);
graph
=
avfilter_graph_alloc
();
if
((
ret
=
configure_video_filters
(
graph
,
is
,
vfilters
))
<
0
)
goto
the_end
;
filt_out
=
is
->
out_video_filter
;
last_w
=
is
->
video_st
->
codec
->
width
;
last_h
=
is
->
video_st
->
codec
->
height
;
}
ret
=
get_filtered_video_frame
(
filt_out
,
frame
,
&
picref
,
&
tb
);
if
(
picref
)
{
pts_int
=
picref
->
pts
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录