[vlc-devel] [PATCH] videotoolbox: require more pictures from the Core
Thomas Guillem
thomas at gllm.fr
Thu Oct 22 13:50:35 CEST 2020
cf. comment.
This is a temporary fix since we don't want that hw decoders depend on a
limit set by the core. Specially for hw decoders that are allocating
their own output buffers.
---
modules/codec/videotoolbox.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/modules/codec/videotoolbox.c b/modules/codec/videotoolbox.c
index aae548504bb..34d3cf422f0 100644
--- a/modules/codec/videotoolbox.c
+++ b/modules/codec/videotoolbox.c
@@ -1463,6 +1463,12 @@ static int OpenDecoder(vlc_object_t *p_this)
break;
}
+ /* Some samples need more than the dbp_size set by the core (18 max). This
+ * is a case for HEVC interlaced samples. Increase this limit to handle
+ * such case. This won't have any impact on memory usage since the picture
+ * from the Core are just place holders to put our VT context. */
+ p_dec->i_extra_picture_buffers = 6;
+
if (p_sys->pf_codec_init && !p_sys->pf_codec_init(p_dec))
{
CloseDecoder(p_this);
--
2.28.0
More information about the vlc-devel
mailing list