Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
external
ffmpeg
Commits
8f3a3ce7
Commit
8f3a3ce7
authored
Jul 15, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi: check all ff_get_video_buffer() calls for errors.
parent
1dc42050
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
0 deletions
+23
-0
buffersrc.c
libavfilter/buffersrc.c
+3
-0
vf_frei0r.c
libavfilter/vf_frei0r.c
+3
-0
vf_pad.c
libavfilter/vf_pad.c
+3
-0
vf_vflip.c
libavfilter/vf_vflip.c
+3
-0
vf_yadif.c
libavfilter/vf_yadif.c
+5
-0
vsrc_color.c
libavfilter/vsrc_color.c
+3
-0
vsrc_testsrc.c
libavfilter/vsrc_testsrc.c
+3
-0
No files found.
libavfilter/buffersrc.c
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment