]> git.sesse.net Git - x264/commitdiff
Fix crash in --demuxer y4m with unsupported colorspace
authorOka Motofumi <chikuzen.mo@gmail.com>
Sun, 29 Jan 2012 11:34:41 +0000 (20:34 +0900)
committerFiona Glaser <fiona@x264.com>
Sat, 4 Feb 2012 15:16:23 +0000 (07:16 -0800)
input/y4m.c

index cec34252555472b66e49fdaa7bad279fe5887b41..462643eff131b38479eae4e7707cd6b266b5c2f3 100644 (file)
@@ -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;