[FFmpeg-cvslog] r23834 - trunk/libavfilter/parseutils.c

stefano subversion
Mon Jun 28 00:35:32 CEST 2010


Author: stefano
Date: Mon Jun 28 00:35:32 2010
New Revision: 23834

Log:
Rename ColorEntry.rgba_color to rgb_color and do not reserve a fourth
byte for the alpha component, as it is never used, clarify the code
and prevent bad usage of it.

Modified:
   trunk/libavfilter/parseutils.c

Modified: trunk/libavfilter/parseutils.c
==============================================================================
--- trunk/libavfilter/parseutils.c	Sun Jun 27 22:18:28 2010	(r23833)
+++ trunk/libavfilter/parseutils.c	Mon Jun 28 00:35:32 2010	(r23834)
@@ -65,7 +65,7 @@ char *av_get_token(const char **buf, con
 
 typedef struct {
     const char *name;            ///< a string representing the name of the color
-    uint8_t     rgba_color[4];   ///< RGBA values for the color
+    uint8_t     rgb_color[3];    ///< RGB values for the color
 } ColorEntry;
 
 static ColorEntry color_table[] = {
@@ -251,7 +251,7 @@ int av_parse_color(uint8_t *rgba_color, 
             av_log(log_ctx, AV_LOG_ERROR, "Cannot find color '%s'\n", color_string);
             return AVERROR(EINVAL);
         }
-        memcpy(rgba_color, entry->rgba_color, 4);
+        memcpy(rgba_color, entry->rgb_color, 3);
     }
 
     return 0;



More information about the ffmpeg-cvslog mailing list