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,17 +933,18 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced) ...@@ -933,17 +933,18 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
bool is_direct = vout->p->decoder_pool == vout->p->display_pool; bool is_direct = vout->p->decoder_pool == vout->p->display_pool;
picture_t *todisplay = filtered; picture_t *todisplay = filtered;
if (do_early_spu && subpic) { if (do_early_spu && subpic) {
if (vout->p->spu_blend) {
picture_t *blent = picture_pool_Get(vout->p->private_pool); picture_t *blent = picture_pool_Get(vout->p->private_pool);
if (blent) { if (blent) {
VideoFormatCopyCropAr(&blent->format, &filtered->format); VideoFormatCopyCropAr(&blent->format, &filtered->format);
picture_Copy(blent, filtered); picture_Copy(blent, filtered);
if (vout->p->spu_blend if (picture_BlendSubpicture(blent, vout->p->spu_blend, subpic)) {
&& picture_BlendSubpicture(blent, vout->p->spu_blend, subpic)) {
picture_Release(todisplay); picture_Release(todisplay);
todisplay = blent; todisplay = blent;
} else } else
picture_Release(blent); picture_Release(blent);
} }
}
subpicture_Delete(subpic); subpicture_Delete(subpic);
subpic = NULL; 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