[vlc-devel] [PATCH 2/2] vout_wrapper: use separate private pool if formats don't match
Steve Lhomme
robux4 at ycbcr.xyz
Mon Oct 28 15:00:14 CET 2019
Partially reverts 857aa22f2c3e9624b1dd680f73bedd00244aa11d
---
src/video_output/vout_wrapper.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/video_output/vout_wrapper.c b/src/video_output/vout_wrapper.c
index 5d841163f94..9e5b14a56bc 100644
--- a/src/video_output/vout_wrapper.c
+++ b/src/video_output/vout_wrapper.c
@@ -98,8 +98,17 @@ vout_display_t *vout_OpenWrapper(vout_thread_t *vout,
reserved_picture, picture_pool_GetSize(display_pool));
#endif
- sys->private_pool = picture_pool_Reserve(display_pool, private_picture);
+ if (!vout_IsDisplayFiltered(vd) &&
+ picture_pool_GetSize(display_pool) >= reserved_picture) {
+ sys->private_pool = picture_pool_Reserve(display_pool, private_picture);
+ } else {
+ sys->private_pool =
+ picture_pool_NewFromFormat(&vd->source,
+ __MAX(VOUT_MAX_PICTURES,
+ reserved_picture - DISPLAY_PICTURE_COUNT));
+ }
if (sys->private_pool == NULL) {
+ picture_pool_Release(display_pool);
goto error;
}
sys->display_pool = display_pool;
--
2.17.1
More information about the vlc-devel
mailing list