[vlc-commits] vout: don't try to blend if we know it's not going to work

Steve Lhomme git at videolan.org
Thu Apr 23 09:06:09 CEST 2015


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Mon Apr 20 10:21:39 2015 +0000| [e865aed6b2bbe59205b21f4ab3b024ae29c89af6] | committer: Thomas Guillem

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

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e865aed6b2bbe59205b21f4ab3b024ae29c89af6
---

 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 43ff7ad..cdb04e5 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -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;



More information about the vlc-commits mailing list