Commit 1bbeb06a authored by Patrik Kullman's avatar Patrik Kullman Committed by Diego Biurrun

Use av_strdup to allocate string, prevents the warning:

vhook/fish.c:130: warning: assignment discards qualifiers from pointer target type
patch by Patrik Kullman, patrik yes nu

Originally committed as revision 17494 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 0a036d07
......@@ -127,7 +127,7 @@ int Configure(void **ctxp, int argc, char *argv[])
optind = 1;
ci->dir = "/tmp";
ci->dir = av_strdup("/tmp");
ci->threshold = 100;
ci->file_limit = 100;
ci->min_interval = 1000000;
......@@ -368,7 +368,8 @@ void Process(void *ctx, AVPicture *picture, enum PixelFormat pix_fmt, int width,
f = fopen(fname, "w");
if (f) {
fprintf(f, "P6 %d %d 255\n", width, height);
fwrite(buf, width * height * 3, 1, f);
if (!fwrite(buf, width * height * 3, 1, f))
av_log(ctx, AV_LOG_ERROR, "Couldn't write to PPM file %s\n", fname);
fclose(f);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment