[vlc-commits] vout: handle error without aborting
Rémi Denis-Courmont
git at videolan.org
Wed Jul 26 21:08:20 CEST 2017
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jul 26 22:07:54 2017 +0300| [7c6e3bf9ffcc5db77b8f6e8f09826b8a93efeb47] | committer: Rémi Denis-Courmont
vout: handle error without aborting
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7c6e3bf9ffcc5db77b8f6e8f09826b8a93efeb47
---
src/video_output/display.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/video_output/display.c b/src/video_output/display.c
index fe2c86e75c..b2f6f4d3d7 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -415,8 +415,6 @@ static int VoutDisplayCreateRender(vout_display_t *vd)
{
vout_display_owner_sys_t *osys = vd->owner.sys;
- osys->filters = NULL;
-
video_format_t v_src = vd->source;
v_src.i_sar_num = 0;
v_src.i_sar_den = 0;
@@ -433,8 +431,10 @@ static int VoutDisplayCreateRender(vout_display_t *vd)
v_dst_cmp.i_chroma = v_src.i_chroma;
const bool convert = memcmp(&v_src, &v_dst_cmp, sizeof(v_src)) != 0;
- if (!convert)
+ if (!convert) {
+ osys->filters = NULL;
return 0;
+ }
msg_Dbg(vd, "A filter to adapt decoder %4.4s to display %4.4s is needed",
(const char *)&v_src.i_chroma, (const char *)&v_dst.i_chroma);
@@ -448,7 +448,7 @@ static int VoutDisplayCreateRender(vout_display_t *vd)
osys->filters = filter_chain_NewVideo(vd, false, &owner);
if (unlikely(osys->filters == NULL))
- abort(); /* TODO critical */
+ return -1;
/* */
es_format_t src;
More information about the vlc-commits
mailing list