]> git.sesse.net Git - x264/commitdiff
Fix frame input colorspace check
authorAnton Mitrofanov <BugMaster@narod.ru>
Sun, 25 Mar 2012 13:34:24 +0000 (17:34 +0400)
committerFiona Glaser <fiona@x264.com>
Sun, 25 Mar 2012 16:56:43 +0000 (09:56 -0700)
common/frame.c

index 8a174062f512a3de6b4a7e5839fed9ffa54f7779..a65610a431df8d72c78b900209f43c5918aec4e9 100644 (file)
@@ -327,7 +327,7 @@ static int get_plane_ptr( x264_t *h, x264_picture_t *src, uint8_t **pix, int *st
 int x264_frame_copy_picture( x264_t *h, x264_frame_t *dst, x264_picture_t *src )
 {
     int i_csp = src->img.i_csp & X264_CSP_MASK;
-    if( i_csp <= X264_CSP_NONE || i_csp >= X264_CSP_MAX )
+    if( dst->i_csp != x264_frame_internal_csp( i_csp ) )
     {
         x264_log( h, X264_LOG_ERROR, "Invalid input colorspace\n" );
         return -1;