[FFmpeg-cvslog] imgconvert: fix color type for non normal pix_fmts like HW stuff and unused entries.

Michael Niedermayer git at videolan.org
Wed Nov 21 17:45:11 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Nov 21 17:37:32 2012 +0100| [6ff544e473a5ba9d583a4c8510d8a724e0a18c91] | committer: Michael Niedermayer

imgconvert: fix color type for non normal pix_fmts like HW stuff and unused entries.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6ff544e473a5ba9d583a4c8510d8a724e0a18c91
---

 libavcodec/imgconvert.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index abbe01b..6051081 100644
--- a/libavcodec/imgconvert.c
+++ b/libavcodec/imgconvert.c
@@ -43,6 +43,7 @@
 #include "x86/dsputil_mmx.h"
 #endif
 
+#define FF_COLOR_NA      -1
 #define FF_COLOR_RGB      0 /**< RGB color space */
 #define FF_COLOR_GRAY     1 /**< gray color space */
 #define FF_COLOR_YUV      2 /**< YUV color space. 16 <= Y <= 235, 16 <= U, V <= 240 */
@@ -444,7 +445,7 @@ static get_color_type(AVPixFmtDescriptor *desc) {
         return  FF_COLOR_RGB;
 
     if(desc->nb_components == 0)
-        return 0;
+        return FF_COLOR_NA;
 
     return FF_COLOR_YUV;
 }



More information about the ffmpeg-cvslog mailing list