[vlc-commits] vout: return failure core on 0 spu attachment

Francois Cartegnie git at videolan.org
Wed Sep 5 11:54:59 CEST 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Sep  5 11:52:39 2018 +0200| [e56bb85d41cd020bbb69cabd8d429f0463dcfb31] | committer: Francois Cartegnie

vout: return failure core on 0 spu attachment

Otherwise pointer is expected to be valid with 0 elements.

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

 src/video_output/vout_subpictures.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
index 71a5544fc6..682461a7ac 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -183,7 +183,7 @@ static int spu_get_attachments(filter_t *filter,
     if (spu->p->input)
     {
         int count = input_GetAttachments(spu->p->input, attachment_ptr);
-        if (count < 0)
+        if (count <= 0)
             return VLC_EGENERIC;
         *attachment_count = count;
         return VLC_SUCCESS;



More information about the vlc-commits mailing list