aboutsummaryrefslogtreecommitdiffstats
path: root/util/szap/azap.c
diff options
context:
space:
mode:
authoretobi <git@e-tobi.net>2013-09-03 09:48:52 +0200
committeretobi <git@e-tobi.net>2013-09-03 09:48:52 +0200
commit5501530a778ad588a8ccd3f1584ea58f74c0cec9 (patch)
tree125c0eb7951f4b97c6b2be809332dcbe3633083c /util/szap/azap.c
parent76c08672bc6c2984ebd7045a71862099890c9118 (diff)
downloadlinux-dvb-apps-upstream/1.1.1+rev1483.tar.gz
Imported Upstream version 1.1.1+rev1483upstream/1.1.1+rev1483
Diffstat (limited to '')
-rw-r--r--util/szap/azap.c82
1 files changed, 41 insertions, 41 deletions
diff --git a/util/szap/azap.c b/util/szap/azap.c
index ea13236..230a7b9 100644
--- a/util/szap/azap.c
+++ b/util/szap/azap.c
@@ -21,18 +21,18 @@ static char DEMUX_DEV [80];
#define CHANNEL_FILE "/.azap/channels.conf"
#define ERROR(x...) \
- do { \
- fprintf(stderr, "ERROR: "); \
- fprintf(stderr, x); \
- fprintf (stderr, "\n"); \
- } while (0)
+ do { \
+ fprintf(stderr, "ERROR: "); \
+ fprintf(stderr, x); \
+ fprintf (stderr, "\n"); \
+ } while (0)
#define PERROR(x...) \
- do { \
- fprintf(stderr, "ERROR: "); \
- fprintf(stderr, x); \
- fprintf (stderr, " (%s)\n", strerror(errno)); \
- } while (0)
+ do { \
+ fprintf(stderr, "ERROR: "); \
+ fprintf(stderr, x); \
+ fprintf (stderr, " (%s)\n", strerror(errno)); \
+ } while (0)
typedef struct {
@@ -353,49 +353,49 @@ int main(int argc, char **argv)
return -1;
- if (rec_psi) {
- pmtpid = get_pmt_pid(DEMUX_DEV, sid);
- if (pmtpid <= 0) {
- fprintf(stderr,"couldn't find pmt-pid for sid %04x\n",sid);
- return -1;
- }
-
- if ((pat_fd = open(DEMUX_DEV, O_RDWR)) < 0) {
- perror("opening pat demux failed");
- return -1;
- }
- if (set_pesfilter(pat_fd, 0, DMX_PES_OTHER, dvr) < 0)
- return -1;
-
- if ((pmt_fd = open(DEMUX_DEV, O_RDWR)) < 0) {
- perror("opening pmt demux failed");
- return -1;
- }
- if (set_pesfilter(pmt_fd, pmtpid, DMX_PES_OTHER, dvr) < 0)
- return -1;
- }
-
- if ((video_fd = open(DEMUX_DEV, O_RDWR)) < 0) {
- PERROR("failed opening '%s'", DEMUX_DEV);
- return -1;
- }
+ if (rec_psi) {
+ pmtpid = get_pmt_pid(DEMUX_DEV, sid);
+ if (pmtpid <= 0) {
+ fprintf(stderr,"couldn't find pmt-pid for sid %04x\n",sid);
+ return -1;
+ }
+
+ if ((pat_fd = open(DEMUX_DEV, O_RDWR)) < 0) {
+ perror("opening pat demux failed");
+ return -1;
+ }
+ if (set_pesfilter(pat_fd, 0, DMX_PES_OTHER, dvr) < 0)
+ return -1;
+
+ if ((pmt_fd = open(DEMUX_DEV, O_RDWR)) < 0) {
+ perror("opening pmt demux failed");
+ return -1;
+ }
+ if (set_pesfilter(pmt_fd, pmtpid, DMX_PES_OTHER, dvr) < 0)
+ return -1;
+ }
+
+ if ((video_fd = open(DEMUX_DEV, O_RDWR)) < 0) {
+ PERROR("failed opening '%s'", DEMUX_DEV);
+ return -1;
+ }
printf ("video pid 0x%04x, audio pid 0x%04x\n", vpid, apid);
if (set_pesfilter (video_fd, vpid, DMX_PES_VIDEO, dvr) < 0)
return -1;
if ((audio_fd = open(DEMUX_DEV, O_RDWR)) < 0) {
- PERROR("failed opening '%s'", DEMUX_DEV);
- return -1;
- }
+ PERROR("failed opening '%s'", DEMUX_DEV);
+ return -1;
+ }
if (set_pesfilter (audio_fd, apid, DMX_PES_AUDIO, dvr) < 0)
return -1;
check_frontend (frontend_fd);
- close (pat_fd);
- close (pmt_fd);
+ close (pat_fd);
+ close (pmt_fd);
close (audio_fd);
close (video_fd);
close (frontend_fd);