[vlc-devel] [PATCH v3 01/12] picture: set the clone planes after the clone is created successfully
Steve Lhomme
robux4 at ycbcr.xyz
Tue Aug 18 08:24:42 CEST 2020
---
src/misc/picture.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/misc/picture.c b/src/misc/picture.c
index e00b1303253..f9af9148829 100644
--- a/src/misc/picture.c
+++ b/src/misc/picture.c
@@ -431,14 +431,11 @@ picture_t *picture_InternalClone(picture_t *picture,
.pf_destroy = pf_destroy,
};
- for (int i = 0; i < picture->i_planes; i++) {
- res.p[i].p_pixels = picture->p[i].p_pixels;
- res.p[i].i_lines = picture->p[i].i_lines;
- res.p[i].i_pitch = picture->p[i].i_pitch;
- }
-
picture_t *clone = picture_NewFromResource(&picture->format, &res);
if (likely(clone != NULL)) {
+ for (int i = 0; i < picture->i_planes; i++) {
+ clone->p[i] = picture->p[i];
+ }
((picture_priv_t *)clone)->gc.opaque = opaque;
picture_Hold(picture);
}
--
2.26.2
More information about the vlc-devel
mailing list