1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-03 05:10:03 +02:00

Merge commit 'b8cd7a3c8df2c3aac8d7a0b5a02d83caf61bd769'

* commit 'b8cd7a3c8df2c3aac8d7a0b5a02d83caf61bd769':
  dvbsub: Check for errors from system()

printf(...) replaced with fprintf(stderr, ...) for logging errors.

Merged-by: Clément Bœsch <u@pkh.me>
This commit is contained in:
Clément Bœsch 2017-04-03 20:57:03 +02:00
commit 9f7ba0ac9d

View File

@ -85,10 +85,16 @@ static void png_save(const char *filename, uint32_t *bitmap, int w, int h)
fclose(f);
snprintf(command, sizeof(command), "pnmtopng -alpha %s %s > %s.png 2> /dev/null", fname2, fname, filename);
system(command);
if (system(command) != 0) {
fprintf(stderr, "Error running pnmtopng\n");
return;
}
snprintf(command, sizeof(command), "rm %s %s", fname, fname2);
system(command);
if (system(command) != 0) {
fprintf(stderr, "Error removing %s and %s\n", fname, fname2);
return;
}
}
#endif