[x264-devel] Fix frame input colorspace check

Anton Mitrofanov git at videolan.org
Wed Apr 25 00:17:08 CEST 2012


x264 | branch: master | Anton Mitrofanov <BugMaster at narod.ru> | Sun Mar 25 17:34:24 2012 +0400| [e0351cdfeb45bf7f891eeb1dc475292154bb9d82] | committer: Jason Garrett-Glaser

Fix frame input colorspace check

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=e0351cdfeb45bf7f891eeb1dc475292154bb9d82
---

 common/frame.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/common/frame.c b/common/frame.c
index 86c7e73..e31919e 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;



More information about the x264-devel mailing list