summaryrefslogtreecommitdiffstats
path: root/vobsub.c
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-12-20 10:10:26 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-12-20 10:10:26 +0000
commitf9455f34d0010686377dca01294a7f7be80d738c (patch)
tree479b5a68da55a2c63447561a610a19f194999831 /vobsub.c
parentf2281fa06aa6659464910913c3a49b10e5221583 (diff)
downloadmpv-f9455f34d0010686377dca01294a7f7be80d738c.tar.bz2
mpv-f9455f34d0010686377dca01294a7f7be80d738c.tar.xz
Remove internal unrarlib copy, the new unrarexec code is a strict superset.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25468 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'vobsub.c')
-rw-r--r--vobsub.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/vobsub.c b/vobsub.c
index 754cfc0feb..95d87ebb80 100644
--- a/vobsub.c
+++ b/vobsub.c
@@ -22,8 +22,6 @@
#include "mp_msg.h"
#ifdef USE_UNRAR_EXEC
#include "unrar_exec.h"
-#elif defined(USE_UNRARLIB)
-#include "unrarlib.h"
#endif
#include "libavutil/common.h"
@@ -35,9 +33,8 @@ static int vobsubid = -2;
/**********************************************************************
* RAR stream handling
* The RAR file must have the same basename as the file to open
- * See <URL:http://www.unrarlib.org/>
**********************************************************************/
-#if defined(USE_UNRARLIB) || defined(USE_UNRAR_EXEC)
+#ifdef USE_UNRAR_EXEC
typedef struct {
FILE *file;
unsigned char *data;
@@ -90,27 +87,15 @@ rar_open(const char *const filename, const char *const mode)
} else {
p++;
}
-#ifdef USE_UNRAR_EXEC
rc = unrar_exec_get(&stream->data, &stream->size, p, rar_filename);
-#endif
-#ifdef USE_UNRARLIB
- if (!rc)
- rc = urarlib_get(&stream->data, &stream->size, (char*) p, rar_filename, "");
-#endif
if (!rc) {
/* There is no matching filename in the archive. However, sometimes
* the files we are looking for have been given arbitrary names in the archive.
* Let's look for a file with an exact match in the extension only. */
int i, num_files = -1, name_len;
ArchiveList_struct *list, *lp;
-#ifdef USE_UNRARLIB
- /* the cast in the next line is a hack to overcome a design flaw (IMHO) in unrarlib */
- num_files = urarlib_list (rar_filename, (ArchiveList_struct *)&list);
-#endif
-#ifdef USE_UNRAR_EXEC
if (num_files <= 0)
num_files = unrar_exec_list(rar_filename, &list);
-#endif
if (num_files > 0) {
char *demanded_ext;
demanded_ext = strrchr (p, '.');
@@ -119,24 +104,13 @@ rar_open(const char *const filename, const char *const mode)
for (i=0, lp=list; i<num_files; i++, lp=lp->next) {
name_len = strlen (lp->item.Name);
if (name_len >= demanded_ext_len && !strcasecmp (lp->item.Name + name_len - demanded_ext_len, demanded_ext)) {
-#ifdef USE_UNRAR_EXEC
rc = unrar_exec_get(&stream->data, &stream->size,
lp->item.Name, rar_filename);
if (rc) break;
-#endif
-#ifdef USE_UNRARLIB
- rc = urarlib_get(&stream->data, &stream->size,
- lp->item.Name, rar_filename, "");
- if (rc) break;
-#endif
}
}
}
-#ifdef USE_UNRARLIB
- urarlib_freelist (list);
-#else
unrar_exec_freelist(list);
-#endif
}
if (!rc) {
free(rar_filename);