[vlc-commits] vout: fix segmentation fault if initialization fails

Rémi Denis-Courmont git at videolan.org
Sat Nov 24 21:48:36 CET 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Nov 24 22:44:41 2012 +0200| [97e88867dde80bfd90e4d1c42d08bde34e1314e3] | committer: Rémi Denis-Courmont

vout: fix segmentation fault if initialization fails

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

 src/video_output/vout_wrapper.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/video_output/vout_wrapper.c b/src/video_output/vout_wrapper.c
index 8e837da..b2cb772 100644
--- a/src/video_output/vout_wrapper.c
+++ b/src/video_output/vout_wrapper.c
@@ -150,6 +150,8 @@ int vout_InitWrapper(vout_thread_t *vout)
             picture_pool_NewFromFormat(&source,
                                        __MAX(VOUT_MAX_PICTURES,
                                              reserved_picture + decoder_picture - DISPLAY_PICTURE_COUNT));
+        if (!sys->decoder_pool)
+            return VLC_EGENERIC;
         if (allow_dr) {
             msg_Warn(vout, "Not enough direct buffers, using system memory");
             sys->dpb_size = 0;



More information about the vlc-commits mailing list