1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00

dvbsub: Check for errors from system()

libavcodec/dvbsubdec.c:145:5: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
libavcodec/dvbsubdec.c:148:5: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
This commit is contained in:
Diego Biurrun 2015-12-11 19:52:36 +01:00
parent 6427379f23
commit b8cd7a3c8d

View File

@ -84,10 +84,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) {
printf("Error running pnmtopng\n");
return;
}
snprintf(command, sizeof(command), "rm %s %s", fname, fname2);
system(command);
if (system(command) != 0) {
printf("Error removing %s and %s\n", fname, fname2);
return;
}
}
#endif