From 007c8ab55c3ca1e2f5a97fe17e091d4b9627bd4c Mon Sep 17 00:00:00 2001 From: phintuka Date: Wed, 14 Mar 2007 14:21:11 +0000 Subject: Fix SPUMAP handling when there are no subtitles --- frontend.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/frontend.c b/frontend.c index d56da1ba..514318c2 100644 --- a/frontend.c +++ b/frontend.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend.c,v 1.32 2007-03-14 11:30:34 phintuka Exp $ + * $Id: frontend.c,v 1.33 2007-03-14 14:21:11 phintuka Exp $ * */ @@ -103,13 +103,15 @@ void cXinelibThread::InfoHandler(const char *info) Current = true; map++; } - int id = atoi(map); - while(*map && *map != ':') map++; - if(*map == ':') map++; - char *lang = map; - while(*map && *map != ' ') map++; - if(*map == ' ') { *map = 0; map++; }; - cXinelibDevice::Instance().SetAvailableDvdSpuTrack(id, *lang ? lang : NULL, Current); + if(*map >= '0' && *map <= '9') { + int id = atoi(map); + while(*map && *map != ':') map++; + if(*map == ':') map++; + char *lang = map; + while(*map && *map != ' ') map++; + if(*map == ' ') { *map = 0; map++; }; + cXinelibDevice::Instance().SetAvailableDvdSpuTrack(id, *lang ? lang : NULL, Current); + } } } -- cgit v1.2.3