Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
f7084c0f
Commit
f7084c0f
authored
Jun 05, 2017
by
Rémi Denis-Courmont
Browse files
picture: copy picture context in picture_Copy() (fixes #14456)
parent
69de4660
Changes
4
Hide whitespace changes
Inline
Side-by-side
include/vlc_picture.h
View file @
f7084c0f
...
...
@@ -59,6 +59,7 @@ typedef struct plane_t
typedef
struct
picture_context_t
{
void
(
*
destroy
)(
struct
picture_context_t
*
);
struct
picture_context_t
*
(
*
copy
)(
struct
picture_context_t
*
);
}
picture_context_t
;
/**
...
...
modules/hw/vdpau/picture.c
View file @
f7084c0f
...
...
@@ -65,7 +65,7 @@ static picture_context_t *SurfaceCopy(picture_context_t *ctx)
return
NULL
;
fnew
->
context
.
destroy
=
SurfaceDestroy
;
fnew
->
copy
=
SurfaceCopy
;
fnew
->
context
.
copy
=
SurfaceCopy
;
fnew
->
frame
=
frame
;
fnew
->
structure
=
fold
->
structure
;
fnew
->
procamp
=
fold
->
procamp
;
...
...
@@ -98,7 +98,7 @@ vlc_vdp_video_field_t *vlc_vdp_video_create(vdp_t *vdp,
}
field
->
context
.
destroy
=
SurfaceDestroy
;
field
->
copy
=
SurfaceCopy
;
field
->
context
.
copy
=
SurfaceCopy
;
field
->
frame
=
frame
;
field
->
structure
=
VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME
;
field
->
procamp
=
procamp_default
;
...
...
modules/hw/vdpau/vlc_vdpau.h
View file @
f7084c0f
...
...
@@ -274,7 +274,6 @@ typedef struct vlc_vdp_video_frame
typedef
struct
vlc_vdp_video_field
{
picture_context_t
context
;
struct
picture_context_t
*
(
*
copy
)(
struct
picture_context_t
*
);
vlc_vdp_video_frame_t
*
frame
;
VdpVideoMixerPictureStructure
structure
;
VdpProcamp
procamp
;
...
...
@@ -303,6 +302,6 @@ static inline void vlc_vdp_video_destroy(vlc_vdp_video_field_t *f)
static
inline
vlc_vdp_video_field_t
*
vlc_vdp_video_copy
(
vlc_vdp_video_field_t
*
fold
)
{
return
(
vlc_vdp_video_field_t
*
)
fold
->
copy
(
&
fold
->
context
);
return
(
vlc_vdp_video_field_t
*
)
fold
->
context
.
copy
(
&
fold
->
context
);
}
#endif
src/misc/picture.c
View file @
f7084c0f
...
...
@@ -368,6 +368,11 @@ void picture_CopyPixels( picture_t *p_dst, const picture_t *p_src )
{
for
(
int
i
=
0
;
i
<
p_src
->
i_planes
;
i
++
)
plane_CopyPixels
(
p_dst
->
p
+
i
,
p_src
->
p
+
i
);
assert
(
p_dst
->
context
==
NULL
);
if
(
p_src
->
context
!=
NULL
)
p_dst
->
context
=
p_src
->
context
->
copy
(
p_src
->
context
);
}
void
picture_Copy
(
picture_t
*
p_dst
,
const
picture_t
*
p_src
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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