[vlc-devel] [PATCH v2 1/3] video_output: don't use the private pool for the blend picture
Steve Lhomme
robux4 at ycbcr.xyz
Mon Aug 17 16:32:59 CEST 2020
Create one on the fly each time. We don't need to preallocate some
pictures if we're never going to use them. Also we don't to know the target
format in advance.
It may cause issues if the format is opaque. But this is currently not handled
either.
---
src/video_output/video_output.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 6cf7a426673..e644da094a4 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1312,12 +1312,11 @@ static int ThreadDisplayRenderPicture(vout_thread_sys_t *vout, bool is_forced)
picture_t *snap_pic = todisplay;
if (do_early_spu && subpic) {
if (sys->spu_blend) {
- picture_t *blent = picture_pool_Get(sys->private.private_pool);
+ picture_t *blent = picture_NewFromFormat(&filtered->format);
if (blent) {
- video_format_CopyCropAr(&blent->format, &filtered->format);
picture_Copy(blent, filtered);
if (picture_BlendSubpicture(blent, sys->spu_blend, subpic)) {
- picture_Release(todisplay);
+ picture_Release(filtered);
snap_pic = todisplay = blent;
} else
{
--
2.26.2
More information about the vlc-devel
mailing list