[x264-devel] Fix crash in --demuxer y4m with unsupported colorspace

Oka Motofumi git at videolan.org
Sat Feb 4 21:10:46 CET 2012


x264 | branch: master | Oka Motofumi <chikuzen.mo at gmail.com> | Sun Jan 29 20:34:41 2012 +0900| [8a1189abd1355c4cf6f786fbc2a4b8c22f398710] | committer: Jason Garrett-Glaser

Fix crash in --demuxer y4m with unsupported colorspace

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=8a1189abd1355c4cf6f786fbc2a4b8c22f398710
---

 input/y4m.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/input/y4m.c b/input/y4m.c
index cec3425..462643e 100644
--- a/input/y4m.c
+++ b/input/y4m.c
@@ -173,7 +173,7 @@ static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t *info, c
     if( colorspace == X264_CSP_NONE )
         colorspace = X264_CSP_I420;
 
-    FAIL_IF_ERROR( colorspace <= X264_CSP_NONE && colorspace >= X264_CSP_MAX, "colorspace unhandled\n" )
+    FAIL_IF_ERROR( colorspace <= X264_CSP_NONE || colorspace >= X264_CSP_MAX, "colorspace unhandled\n" )
 
     info->thread_safe = 1;
     info->num_frames  = 0;



More information about the x264-devel mailing list