[FFmpeg-cvslog] r23053 - trunk/libavfilter/vf_scale.c

michael subversion
Fri May 7 15:00:56 CEST 2010


Author: michael
Date: Fri May  7 15:00:56 2010
New Revision: 23053

Log:
c99 sucks. Replacing scanf("%i") by strtoul()

Modified:
   trunk/libavfilter/vf_scale.c

Modified: trunk/libavfilter/vf_scale.c
==============================================================================
--- trunk/libavfilter/vf_scale.c	Fri May  7 14:52:46 2010	(r23052)
+++ trunk/libavfilter/vf_scale.c	Fri May  7 15:00:56 2010	(r23053)
@@ -46,11 +46,13 @@ typedef struct {
 static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
 {
     ScaleContext *scale = ctx->priv;
+    const char *p;
 
     scale->flags = SWS_BILINEAR;
     if (args){
         sscanf(args, "%d:%d", &scale->w, &scale->h);
-        sscanf(strstr(args,"flags="), "flags=%i", &scale->flags);
+        p= strstr(args,"flags=");
+        if(p) scale->flags= strtoul(p+6, NULL, 0);
     }
 
     /* sanity check params */



More information about the ffmpeg-cvslog mailing list