summaryrefslogtreecommitdiff
path: root/libavcodec/dvbsubdec.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2015-12-11 19:52:36 +0100
committerDiego Biurrun <diego@biurrun.de>2016-11-23 07:36:32 +0100
commitb8cd7a3c8df2c3aac8d7a0b5a02d83caf61bd769 (patch)
treef9b3b47d6d76c23bf01931ca00eca4e3dc7f57fc /libavcodec/dvbsubdec.c
parent6427379f23eb4d2b82d8d274c616f68b65a2f723 (diff)
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]
Diffstat (limited to 'libavcodec/dvbsubdec.c')
-rw-r--r--libavcodec/dvbsubdec.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index ccdfc01089..e512b97a07 100644
--- a/libavcodec/dvbsubdec.c
+++ b/libavcodec/dvbsubdec.c
@@ -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