diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2012-03-08 09:37:17 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2012-03-08 09:37:17 +0100 |
commit | 9b68c100b2d221224382fe139599828f3ea663b7 (patch) | |
tree | 3c403130cba5a83a52a0569b6228289e5283af44 /channels.c | |
parent | 57f58a154654311fc70e478c0b36262da5c414c6 (diff) | |
download | vdr-9b68c100b2d221224382fe139599828f3ea663b7.tar.gz vdr-9b68c100b2d221224382fe139599828f3ea663b7.tar.bz2 |
Fixed parsing channel data in case the audio pid is 0
Diffstat (limited to 'channels.c')
-rw-r--r-- | channels.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: channels.c 2.19 2011/08/26 12:44:21 kls Exp $ + * $Id: channels.c 2.20 2012/03/07 16:50:15 kls Exp $ */ #include "channels.h" @@ -619,7 +619,8 @@ bool cChannel::Parse(const char *s) } else *alangs[NumApids] = 0; - apids[NumApids++] = strtol(q, NULL, 10); + if ((apids[NumApids] = strtol(q, NULL, 10)) != 0) + NumApids++; } else esyslog("ERROR: too many APIDs!"); // no need to set ok to 'false' @@ -647,7 +648,8 @@ bool cChannel::Parse(const char *s) } else *dlangs[NumDpids] = 0; - dpids[NumDpids++] = strtol(q, NULL, 10); + if ((dpids[NumDpids] = strtol(q, NULL, 10)) != 0) + NumDpids++; } else esyslog("ERROR: too many DPIDs!"); // no need to set ok to 'false' |