Mercurial > mplayer.hg
diff sub/vobsub.c @ 32588:aa82dfc7bd49
Make use of mp_basename in a few places.
author | cboesch |
---|---|
date | Sat, 04 Dec 2010 10:24:42 +0000 |
parents | b39155e98ac3 |
children | 45e772bf4d6a |
line wrap: on
line diff
--- a/sub/vobsub.c Sat Dec 04 01:55:18 2010 +0000 +++ b/sub/vobsub.c Sat Dec 04 10:24:42 2010 +0000 @@ -36,6 +36,7 @@ #include "vobsub.h" #include "spudec.h" #include "mp_msg.h" +#include "path.h" #include "unrar_exec.h" #include "libavutil/common.h" @@ -95,11 +96,7 @@ strcat(rar_filename, ".rar"); } /* get rid of the path if there is any */ - if ((p = strrchr(filename, '/')) == NULL) { - p = filename; - } else { - p++; - } + p = mp_basename(filename); rc = unrar_exec_get(&stream->data, &stream->size, p, rar_filename); if (!rc) { /* There is no matching filename in the archive. However, sometimes