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

Rémi Denis-Courmont remi at remlab.net
Fri Jun 28 20:30:14 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.1




More information about the vlc-devel mailing list