[FFmpeg-soc] [soc]: r4062 - libavfilter/vf_format.c

stefano subversion at mplayerhq.hu
Mon Feb 16 22:17:00 CET 2009


Author: stefano
Date: Mon Feb 16 22:16:57 2009
New Revision: 4062

Log:
Define and use a macro FMT_NAME_MAXSIZE for the format name max size,
instead of hardcoding that value all over the file.

Modified:
   libavfilter/vf_format.c

Modified: libavfilter/vf_format.c
==============================================================================
--- libavfilter/vf_format.c	Mon Feb 16 22:11:25 2009	(r4061)
+++ libavfilter/vf_format.c	Mon Feb 16 22:16:57 2009	(r4062)
@@ -30,11 +30,13 @@ typedef struct
     uint8_t formats[PIX_FMT_NB];
 } FormatContext;
 
+#define FMT_NAME_MAXSIZE 32
+
 static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
 {
     FormatContext *format = ctx->priv;
     const char *cur, *sep;
-    char name[32];
+    char name[FMT_NAME_MAXSIZE];
     int fmt, len;
 
     /* parse the list of formats */
@@ -43,7 +45,7 @@ static av_cold int init(AVFilterContext 
             len = strlen(cur);
         else
             len = sep - cur;
-        if(len >= 32) {
+        if(len >= FMT_NAME_MAXSIZE) {
             av_log(ctx, AV_LOG_ERROR, "Format name too long\n");
             return -1;
         }



More information about the FFmpeg-soc mailing list