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)
committerJason Garrett-Glaser <jason@x264.com>
Sat, 4 Feb 2012 15:16:23 +0000 (07:16 -0800)
input/y4m.c

index cec3425..462643e 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;