[FFmpeg-cvslog] r17494 - trunk/vhook/fish.c
diego
subversion
Sat Feb 21 21:35:59 CET 2009
Author: diego
Date: Sat Feb 21 21:35:58 2009
New Revision: 17494
Log:
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
Modified:
trunk/vhook/fish.c
Modified: trunk/vhook/fish.c
==============================================================================
--- trunk/vhook/fish.c Sat Feb 21 21:29:49 2009 (r17493)
+++ trunk/vhook/fish.c Sat Feb 21 21:35:58 2009 (r17494)
@@ -127,7 +127,7 @@ int Configure(void **ctxp, int argc, cha
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 *pictu
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);
}
More information about the ffmpeg-cvslog
mailing list