[vlc-commits] vout: fix segmentation fault if initialization fails
Rémi Denis-Courmont
git at videolan.org
Sat Nov 24 22:04:14 CET 2012
vlc/vlc-2.0 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Nov 24 22:44:41 2012 +0200| [329bb89097c9ae8e2c4df57748bdb63d6fdd9872] | committer: Rémi Denis-Courmont
vout: fix segmentation fault if initialization fails
(cherry picked from commit 97e88867dde80bfd90e4d1c42d08bde34e1314e3)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=329bb89097c9ae8e2c4df57748bdb63d6fdd9872
---
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 d3a2855..a190f4c 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