[vlc-devel] [PATCH 25/48] vout: keep the original picture if "early" SPU blending fails

Rémi Denis-Courmont remi at remlab.net
Tue Jul 2 19:51:51 CEST 2013


This avoids loosing the picture context if there is one. If the
original picture has no context, it makes no difference whether the
original or the copy is kept since blending failed anyway.
---
 src/video_output/video_output.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 26eca24..c0401c1 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -975,8 +975,8 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
         if (blent) {
             VideoFormatCopyCropAr(&blent->format, &filtered->format);
             picture_Copy(blent, filtered);
-            if (vout->p->spu_blend) {
-                picture_BlendSubpicture(blent, vout->p->spu_blend, subpic);
+            if (vout->p->spu_blend
+             && picture_BlendSubpicture(blent, vout->p->spu_blend, subpic)) {
                 picture_Release(todisplay);
                 todisplay = blent;
             } else
-- 
1.8.3.2




More information about the vlc-devel mailing list