Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
8f3a3ce7
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,发现更多精彩内容 >>
提交
8f3a3ce7
编写于
7月 15, 2012
作者:
A
Anton Khirnov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lavfi: check all ff_get_video_buffer() calls for errors.
上级
1dc42050
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
23 addition
and
0 deletion
+23
-0
libavfilter/buffersrc.c
libavfilter/buffersrc.c
+3
-0
libavfilter/vf_frei0r.c
libavfilter/vf_frei0r.c
+3
-0
libavfilter/vf_pad.c
libavfilter/vf_pad.c
+3
-0
libavfilter/vf_vflip.c
libavfilter/vf_vflip.c
+3
-0
libavfilter/vf_yadif.c
libavfilter/vf_yadif.c
+5
-0
libavfilter/vsrc_color.c
libavfilter/vsrc_color.c
+3
-0
libavfilter/vsrc_testsrc.c
libavfilter/vsrc_testsrc.c
+3
-0
未找到文件。
libavfilter/buffersrc.c
浏览文件 @
8f3a3ce7
...
...
@@ -92,6 +92,9 @@ int av_buffersrc_write_frame(AVFilterContext *buffer_filter, AVFrame *frame)
frame
->
format
);
buf
=
ff_get_video_buffer
(
buffer_filter
->
outputs
[
0
],
AV_PERM_WRITE
,
c
->
w
,
c
->
h
);
if
(
!
buf
)
return
AVERROR
(
ENOMEM
);
av_image_copy
(
buf
->
data
,
buf
->
linesize
,
frame
->
data
,
frame
->
linesize
,
c
->
pix_fmt
,
c
->
w
,
c
->
h
);
break
;
...
...
libavfilter/vf_frei0r.c
浏览文件 @
8f3a3ce7
...
...
@@ -441,6 +441,9 @@ static int source_request_frame(AVFilterLink *outlink)
AVFilterBufferRef
*
buf_out
;
int
ret
;
if
(
!
picref
)
return
AVERROR
(
ENOMEM
);
picref
->
video
->
pixel_aspect
=
(
AVRational
)
{
1
,
1
};
picref
->
pts
=
frei0r
->
pts
++
;
picref
->
pos
=
-
1
;
...
...
libavfilter/vf_pad.c
浏览文件 @
8f3a3ce7
...
...
@@ -262,6 +262,9 @@ static AVFilterBufferRef *get_video_buffer(AVFilterLink *inlink, int perms, int
h
+
(
pad
->
h
-
pad
->
in_h
));
int
plane
;
if
(
!
picref
)
return
NULL
;
picref
->
video
->
w
=
w
;
picref
->
video
->
h
=
h
;
...
...
libavfilter/vf_vflip.c
浏览文件 @
8f3a3ce7
...
...
@@ -52,6 +52,9 @@ static AVFilterBufferRef *get_video_buffer(AVFilterLink *link, int perms,
return
ff_default_get_video_buffer
(
link
,
perms
,
w
,
h
);
picref
=
ff_get_video_buffer
(
link
->
dst
->
outputs
[
0
],
perms
,
w
,
h
);
if
(
!
picref
)
return
NULL
;
for
(
i
=
0
;
i
<
4
;
i
++
)
{
int
vsub
=
i
==
1
||
i
==
2
?
flip
->
vsub
:
0
;
...
...
libavfilter/vf_yadif.c
浏览文件 @
8f3a3ce7
...
...
@@ -173,6 +173,9 @@ static int return_frame(AVFilterContext *ctx, int is_second)
if
(
is_second
)
{
yadif
->
out
=
ff_get_video_buffer
(
link
,
AV_PERM_WRITE
|
AV_PERM_PRESERVE
|
AV_PERM_REUSE
,
link
->
w
,
link
->
h
);
if
(
!
yadif
->
out
)
return
AVERROR
(
ENOMEM
);
avfilter_copy_buffer_ref_props
(
yadif
->
out
,
yadif
->
cur
);
yadif
->
out
->
video
->
interlaced
=
0
;
}
...
...
@@ -239,6 +242,8 @@ static int start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
yadif
->
out
=
ff_get_video_buffer
(
ctx
->
outputs
[
0
],
AV_PERM_WRITE
|
AV_PERM_PRESERVE
|
AV_PERM_REUSE
,
link
->
w
,
link
->
h
);
if
(
!
yadif
->
out
)
return
AVERROR
(
ENOMEM
);
avfilter_copy_buffer_ref_props
(
yadif
->
out
,
yadif
->
cur
);
yadif
->
out
->
video
->
interlaced
=
0
;
...
...
libavfilter/vsrc_color.c
浏览文件 @
8f3a3ce7
...
...
@@ -145,6 +145,9 @@ static int color_request_frame(AVFilterLink *link)
AVFilterBufferRef
*
buf_out
;
int
ret
;
if
(
!
picref
)
return
AVERROR
(
ENOMEM
);
picref
->
video
->
pixel_aspect
=
(
AVRational
)
{
1
,
1
};
picref
->
pts
=
color
->
pts
++
;
picref
->
pos
=
-
1
;
...
...
libavfilter/vsrc_testsrc.c
浏览文件 @
8f3a3ce7
...
...
@@ -135,6 +135,9 @@ static int request_frame(AVFilterLink *outlink)
if
(
test
->
max_pts
>=
0
&&
test
->
pts
>
test
->
max_pts
)
return
AVERROR_EOF
;
picref
=
ff_get_video_buffer
(
outlink
,
AV_PERM_WRITE
,
test
->
w
,
test
->
h
);
if
(
!
picref
)
return
AVERROR
(
ENOMEM
);
picref
->
pts
=
test
->
pts
++
;
picref
->
pos
=
-
1
;
picref
->
video
->
key_frame
=
1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录