[vlc-devel] [PATCH] vout: don't try to blend if we know it's not going to work
Steve Lhomme
robux4 at videolabs.io
Mon Apr 20 13:21:39 CEST 2015
---
src/video_output/video_output.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index cd1fd60..81b093f 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -916,16 +916,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;
--
2.3.0
More information about the vlc-devel
mailing list