[bTSstream-devel] [Git][videolan/bitstream][master] 2 commits: dvb_gen_si: check write() return even if error is unlikely
Kieran Kunhya
gitlab at videolan.org
Sun Jun 19 21:56:26 CEST 2016
Kieran Kunhya pushed to branch master at videolan / bitstream
Commits:
82cd4167 by Rafaël Carré at 2016-06-19T21:41:04+02:00
dvb_gen_si: check write() return even if error is unlikely
- - - - -
1b23862c by Kieran Kunhya at 2016-06-19T21:56:18+02:00
Merge branch 'master' into 'master'
dvb_gen_si: check write() return even if error is unlikely
See merge request !1
- - - - -
1 changed file:
- examples/dvb_gen_si.c
Changes:
=====================================
examples/dvb_gen_si.c
=====================================
--- a/examples/dvb_gen_si.c
+++ b/examples/dvb_gen_si.c
@@ -35,6 +35,7 @@
#include <string.h>
#include <stdio.h>
#include <unistd.h>
+#include <errno.h>
#include <bitstream/mpeg/ts.h>
#include <bitstream/mpeg/psi.h>
@@ -1751,7 +1752,8 @@ static void output_psi_section(uint8_t *section, uint16_t pid, uint8_t *cc) {
if (section_offset == section_length)
psi_split_end(ts, &ts_offset);
- write(fileno(stdout), ts, TS_SIZE);
+ if (write(fileno(stdout), ts, TS_SIZE) < 0)
+ perror("write");
} while (section_offset < section_length);
}
View it on GitLab: https://code.videolan.org/videolan/bitstream/compare/2cc628e460c86087ee5de7c455a864326529695d...1b23862cb65f2c940d375665a25d8d0bd90f90f6
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/bitstream-devel/attachments/20160619/0cf42188/attachment.html>
More information about the biTStream-devel
mailing list