Commit e865aed6 authored by Steve Lhomme's avatar Steve Lhomme Committed by Thomas Guillem

vout: don't try to blend if we know it's not going to work

Signed-off-by: default avatarThomas Guillem <thomas@gllm.fr>
parent 92216e0c
......@@ -933,16 +933,17 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
bool is_direct = vout->p->decoder_pool == vout->p->display_pool;
picture_t *todisplay = filtered;
if (do_early_spu && subpic) {
picture_t *blent = picture_pool_Get(vout->p->private_pool);
if (blent) {
VideoFormatCopyCropAr(&blent->format, &filtered->format);
picture_Copy(blent, filtered);
if (vout->p->spu_blend
&& picture_BlendSubpicture(blent, vout->p->spu_blend, subpic)) {
picture_Release(todisplay);
todisplay = blent;
} else
picture_Release(blent);
if (vout->p->spu_blend) {
picture_t *blent = picture_pool_Get(vout->p->private_pool);
if (blent) {
VideoFormatCopyCropAr(&blent->format, &filtered->format);
picture_Copy(blent, filtered);
if (picture_BlendSubpicture(blent, vout->p->spu_blend, subpic)) {
picture_Release(todisplay);
todisplay = blent;
} else
picture_Release(blent);
}
}
subpicture_Delete(subpic);
subpic = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment