[vlc-commits] display: do not use assert() for error handling

Rémi Denis-Courmont git at videolan.org
Sat Apr 25 09:24:48 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Apr 25 10:11:13 2015 +0300| [c7217f8539a074af04a9b9233a2a7ad7a7931ba4] | committer: Rémi Denis-Courmont

display: do not use assert() for error handling

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

 src/video_output/display.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/video_output/display.c b/src/video_output/display.c
index e31c2a9..643ce44 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -445,7 +445,8 @@ static int VoutDisplayCreateRender(vout_display_t *vd)
     };
 
     osys->filters = filter_chain_NewVideo(vd, false, &owner);
-    assert(osys->filters); /* TODO critical */
+    if (unlikely(osys->filters == NULL))
+        abort(); /* TODO critical */
 
     /* */
     es_format_t src;



More information about the vlc-commits mailing list