dvbv5-zap: only start audio filtering if audio PID > 0
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Sat, 15 Mar 2014 12:08:09 +0000 (09:08 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Sat, 15 Mar 2014 12:25:04 +0000 (09:25 -0300)
When used with -P, audio filter PID is zero. Yet, it is
currently starting an audio PID filter. This could cause
troubles with some hardware filters.

As PID is always bigger than zero, this patch should fix
the issue.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
utils/dvb/dvbv5-zap.c

index cffac98..5c3b74c 100644 (file)
@@ -853,7 +853,7 @@ int main(int argc, char **argv)
                }
        }
 
-       if (apid >= 0) {
+       if (apid > 0) {
                if (args.silent < 2)
                        fprintf(stderr, "audio pid %d\n", apid);
                if ((audio_fd = open(args.demux_dev, O_RDWR)) < 0) {