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

index 86c7e730651d26ed845101998d1dc7c97c5b5595..e31919e65ce32dc2e4f01f95eaf3b5dfddba21a2 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;