Mercurial > mplayer.hg
comparison subreader.c @ 3433:8519aba2644d
Patch by artur Zaprzala:
This patch adds test for NULL return value of strchr().
author | atmos4 |
---|---|
date | Mon, 10 Dec 2001 14:48:02 +0000 |
parents | 0cf593b6bab0 |
children | 5a11cbf8791f |
comparison
equal
deleted
inserted
replaced
3432:5cb7caab5536 | 3433:8519aba2644d |
---|---|
271 if ((current->end - current->start) > 1000) {current->end = current->start + 1000;} // not too long though. | 271 if ((current->end - current->start) > 1000) {current->end = current->start + 1000;} // not too long though. |
272 // teraz czas na wkopiowanie stringu | 272 // teraz czas na wkopiowanie stringu |
273 p=line; | 273 p=line; |
274 // finds the body of the subtitle | 274 // finds the body of the subtitle |
275 for (i=0; i<3; i++){ | 275 for (i=0; i<3; i++){ |
276 p=strchr(p,':')+1; | 276 p=strchr(p,':'); |
277 } | 277 if (p==NULL) break; |
278 ++p; | |
279 } | |
280 if (p==NULL) { | |
281 printf("SUB: Skipping incorrect subtitle line!\n"); | |
282 continue; | |
283 } | |
278 i=0; | 284 i=0; |
279 | 285 |
280 if (*p!='|') { | 286 if (*p!='|') { |
281 // | 287 // |
282 next = p,i=0; | 288 next = p,i=0; |