From fff12b1b7d8ce5cc9cfcfac09f089bae06cac6d5 Mon Sep 17 00:00:00 2001 From: Anton Mitrofanov Date: Sun, 25 Mar 2012 17:34:24 +0400 Subject: [PATCH] Fix frame input colorspace check --- common/frame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/frame.c b/common/frame.c index 8a174062..a65610a4 100644 --- a/common/frame.c +++ b/common/frame.c @@ -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; -- 2.40.0