c99 sucks. Replacing scanf("%i") by strtoul()
Originally committed as revision 23053 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
06e1db056d
commit
a0aa73544c
@ -46,11 +46,13 @@ typedef struct {
|
|||||||
static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
|
static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
|
||||||
{
|
{
|
||||||
ScaleContext *scale = ctx->priv;
|
ScaleContext *scale = ctx->priv;
|
||||||
|
const char *p;
|
||||||
|
|
||||||
scale->flags = SWS_BILINEAR;
|
scale->flags = SWS_BILINEAR;
|
||||||
if (args){
|
if (args){
|
||||||
sscanf(args, "%d:%d", &scale->w, &scale->h);
|
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 */
|
/* sanity check params */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user