Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
cbaaea93
Commit
cbaaea93
authored
Jul 14, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
picture: add pf_destroy to picture_resource_t
parent
64f8465b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
include/vlc_picture.h
include/vlc_picture.h
+1
-0
src/misc/picture.c
src/misc/picture.c
+6
-1
No files found.
include/vlc_picture.h
View file @
cbaaea93
...
@@ -133,6 +133,7 @@ VLC_API picture_t * picture_NewFromFormat( const video_format_t *p_fmt ) VLC_USE
...
@@ -133,6 +133,7 @@ VLC_API picture_t * picture_NewFromFormat( const video_format_t *p_fmt ) VLC_USE
typedef
struct
typedef
struct
{
{
picture_sys_t
*
p_sys
;
picture_sys_t
*
p_sys
;
void
(
*
pf_destroy
)(
picture_t
*
);
/* Plane resources
/* Plane resources
* XXX all fields MUST be set to the right value.
* XXX all fields MUST be set to the right value.
...
...
src/misc/picture.c
View file @
cbaaea93
...
@@ -226,6 +226,7 @@ picture_t *picture_NewFromResource( const video_format_t *p_fmt, const picture_r
...
@@ -226,6 +226,7 @@ picture_t *picture_NewFromResource( const video_format_t *p_fmt, const picture_r
if
(
p_resource
)
if
(
p_resource
)
{
{
p_picture
->
p_sys
=
p_resource
->
p_sys
;
p_picture
->
p_sys
=
p_resource
->
p_sys
;
p_picture
->
gc
.
pf_destroy
=
p_resource
->
pf_destroy
;
assert
(
p_picture
->
gc
.
p_sys
==
NULL
);
assert
(
p_picture
->
gc
.
p_sys
==
NULL
);
for
(
int
i
=
0
;
i
<
p_picture
->
i_planes
;
i
++
)
for
(
int
i
=
0
;
i
<
p_picture
->
i_planes
;
i
++
)
...
@@ -243,18 +244,22 @@ picture_t *picture_NewFromResource( const video_format_t *p_fmt, const picture_r
...
@@ -243,18 +244,22 @@ picture_t *picture_NewFromResource( const video_format_t *p_fmt, const picture_r
return
NULL
;
return
NULL
;
}
}
}
}
/* */
/* */
p_picture
->
format
=
fmt
;
p_picture
->
format
=
fmt
;
vlc_atomic_set
(
&
p_picture
->
gc
.
refcount
,
1
);
vlc_atomic_set
(
&
p_picture
->
gc
.
refcount
,
1
);
if
(
p_picture
->
gc
.
pf_destroy
==
NULL
)
p_picture
->
gc
.
pf_destroy
=
PictureDestroy
;
p_picture
->
gc
.
pf_destroy
=
PictureDestroy
;
return
p_picture
;
return
p_picture
;
}
}
picture_t
*
picture_NewFromFormat
(
const
video_format_t
*
p_fmt
)
picture_t
*
picture_NewFromFormat
(
const
video_format_t
*
p_fmt
)
{
{
return
picture_NewFromResource
(
p_fmt
,
NULL
);
return
picture_NewFromResource
(
p_fmt
,
NULL
);
}
}
picture_t
*
picture_New
(
vlc_fourcc_t
i_chroma
,
int
i_width
,
int
i_height
,
int
i_sar_num
,
int
i_sar_den
)
picture_t
*
picture_New
(
vlc_fourcc_t
i_chroma
,
int
i_width
,
int
i_height
,
int
i_sar_num
,
int
i_sar_den
)
{
{
video_format_t
fmt
;
video_format_t
fmt
;
...
...
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