[vlc-devel] [PATCH 2/2] RFC: core/vout: don't reset the display pool
Steve Lhomme
robux4 at gmail.com
Wed Jan 4 08:38:09 CET 2017
On Tue, Jan 3, 2017 at 4:45 PM, Thomas Guillem <thomas at gllm.fr> wrote:
> In case of direct rendering, the decoder_pool (== the display_pool) should not
> be reseted. Indeed, the vout display module implementation could still hold
> pictures while the decoder is reseted. This fixes the warning "n picture(s)
> leaked by decoder" and an assert from picture_pool_ReleasePicture() when the
> vout is finally releasing the picture.
That sounds hackish when the vout reset is already described as a hack:
/* Hack to make sure all the the pictures are freed by the decoder
* and that the vout is not paused anymore */
It seems that a cleaner fix would be to release the pictures when
there's no reference left ? Or there's no way to know ?
> ---
> src/video_output/video_output.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
> index cde380871b..017ed8cddb 100644
> --- a/src/video_output/video_output.c
> +++ b/src/video_output/video_output.c
> @@ -1210,7 +1210,8 @@ static void ThreadFlush(vout_thread_t *vout, bool below, mtime_t date)
> static void ThreadReset(vout_thread_t *vout)
> {
> ThreadFlush(vout, true, INT64_MAX);
> - if (vout->p->decoder_pool) {
> + if (vout->p->decoder_pool && vout->p->decoder_pool != vout->p->display_pool)
> + {
> unsigned count, leaks;
>
> if (vout->p->private_pool != NULL) {
> --
> 2.11.0
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list