Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
d631d06d
Commit
d631d06d
authored
Dec 12, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
picture: merge p_data_orig into gc.p_sys
parent
1cddb78c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
include/vlc_picture.h
include/vlc_picture.h
+1
-2
src/misc/picture.c
src/misc/picture.c
+5
-5
No files found.
include/vlc_picture.h
View file @
d631d06d
...
...
@@ -73,7 +73,6 @@ struct picture_t
*/
video_frame_format_t
format
;
void
*
p_data_orig
;
/**< pointer before memalign */
plane_t
p
[
PICTURE_PLANE_MAX
];
/**< description of the planes */
int
i_planes
;
/**< number of allocated planes */
...
...
@@ -117,7 +116,7 @@ struct picture_t
* This function will create a new picture.
* The picture created will implement a default release management compatible
* with picture_Hold and picture_Release. This default management will release
* p_sys, p_q,
p_data_orig
fields if non NULL.
* p_sys, p_q,
gc.p_sys
fields if non NULL.
*/
VLC_API
picture_t
*
picture_New
(
vlc_fourcc_t
i_chroma
,
int
i_width
,
int
i_height
,
int
i_sar_num
,
int
i_sar_den
)
VLC_USED
;
...
...
src/misc/picture.c
View file @
d631d06d
...
...
@@ -77,7 +77,7 @@ static int AllocatePicture( picture_t *p_pic,
p_pic
->
i_planes
=
0
;
return
VLC_EGENERIC
;
}
p_pic
->
p_data_orig
=
p_data
;
/* TODO: get rid of this */
p_pic
->
gc
.
p_sys
=
(
void
*
)
p_data
;
/* Fill the p_pixels field for each plane */
p_pic
->
p
[
0
].
p_pixels
=
p_data
;
...
...
@@ -96,11 +96,10 @@ static int AllocatePicture( picture_t *p_pic,
static
void
PictureDestroy
(
picture_t
*
p_picture
)
{
assert
(
p_picture
&&
vlc_atomic_get
(
&
p_picture
->
gc
.
refcount
)
==
0
&&
p_picture
->
gc
.
p_sys
==
NULL
);
vlc_atomic_get
(
&
p_picture
->
gc
.
refcount
)
==
0
);
free
(
p_picture
->
p_q
);
vlc_free
(
p_picture
->
p_data_orig
);
vlc_free
(
p_picture
->
gc
.
p_sys
);
free
(
p_picture
->
p_sys
);
free
(
p_picture
);
}
...
...
@@ -230,6 +229,7 @@ picture_t *picture_NewFromResource( const video_format_t *p_fmt, const picture_r
return
NULL
;
}
p_picture
->
p_sys
=
p_resource
->
p_sys
;
assert
(
p_picture
->
gc
.
p_sys
==
NULL
);
for
(
int
i
=
0
;
i
<
p_picture
->
i_planes
;
i
++
)
{
...
...
@@ -247,13 +247,13 @@ picture_t *picture_NewFromResource( const video_format_t *p_fmt, const picture_r
free
(
p_picture
);
return
NULL
;
}
assert
(
p_picture
->
gc
.
p_sys
!=
NULL
);
}
/* */
p_picture
->
format
=
fmt
;
vlc_atomic_set
(
&
p_picture
->
gc
.
refcount
,
1
);
p_picture
->
gc
.
pf_destroy
=
PictureDestroy
;
p_picture
->
gc
.
p_sys
=
NULL
;
return
p_picture
;
}
...
...
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