[libbluray-devel] Removed unused verbose flag from mpls_parse()/clpi_parse()
hpi1
git at videolan.org
Sun Mar 10 20:55:34 CET 2013
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sun Mar 10 21:54:00 2013 +0200| [45fde6ceac58a78e0110d176bc1cab8b29f0bae2] | committer: hpi1
Removed unused verbose flag from mpls_parse()/clpi_parse()
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=45fde6ceac58a78e0110d176bc1cab8b29f0bae2
---
src/examples/clpi_dump.c | 2 +-
src/examples/mpls_dump.c | 2 +-
src/libbluray/bdnav/clpi_parse.c | 12 ++++--------
src/libbluray/bdnav/clpi_parse.h | 2 +-
src/libbluray/bdnav/mpls_parse.c | 12 ++++--------
src/libbluray/bdnav/mpls_parse.h | 2 +-
src/libbluray/bdnav/navigation.c | 8 ++++----
7 files changed, 16 insertions(+), 24 deletions(-)
diff --git a/src/examples/clpi_dump.c b/src/examples/clpi_dump.c
index 49e9c59..631ca34 100644
--- a/src/examples/clpi_dump.c
+++ b/src/examples/clpi_dump.c
@@ -417,7 +417,7 @@ main(int argc, char *argv[])
}
for (ii = optind; ii < argc; ii++) {
- cl = clpi_parse(argv[ii], verbose);
+ cl = clpi_parse(argv[ii]);
if (cl == NULL) {
fprintf(stderr, "Parse failed\n");
continue;
diff --git a/src/examples/mpls_dump.c b/src/examples/mpls_dump.c
index dc06779..4942586 100644
--- a/src/examples/mpls_dump.c
+++ b/src/examples/mpls_dump.c
@@ -526,7 +526,7 @@ _process_file(char *name, MPLS_PL *pl_list[], int pl_count)
{
MPLS_PL *pl;
- pl = mpls_parse(name, verbose);
+ pl = mpls_parse(name);
if (pl == NULL) {
fprintf(stderr, "Parse failed: %s\n", name);
return NULL;
diff --git a/src/libbluray/bdnav/clpi_parse.c b/src/libbluray/bdnav/clpi_parse.c
index ce0b27b..5cbb788 100644
--- a/src/libbluray/bdnav/clpi_parse.c
+++ b/src/libbluray/bdnav/clpi_parse.c
@@ -30,8 +30,6 @@
#define CLPI_SIG2A ('0' << 24 | '2' << 16 | '0' << 8 | '0')
#define CLPI_SIG2B ('0' << 24 | '1' << 16 | '0' << 8 | '0')
-static int clpi_verbose = 0;
-
static void
_human_readable_sig(char *sig, uint32_t s1, uint32_t s2)
{
@@ -648,14 +646,12 @@ clpi_free(CLPI_CL *cl)
}
static CLPI_CL*
-_clpi_parse(const char *path, int verbose)
+_clpi_parse(const char *path)
{
BITSTREAM bits;
BD_FILE_H *fp;
CLPI_CL *cl;
- clpi_verbose = verbose;
-
cl = calloc(1, sizeof(CLPI_CL));
if (cl == NULL) {
return NULL;
@@ -707,9 +703,9 @@ _clpi_parse(const char *path, int verbose)
}
CLPI_CL*
-clpi_parse(const char *path, int verbose)
+clpi_parse(const char *path)
{
- CLPI_CL *cl = _clpi_parse(path, verbose);
+ CLPI_CL *cl = _clpi_parse(path);
/* if failed, try backup file */
if (!cl) {
@@ -720,7 +716,7 @@ clpi_parse(const char *path, int verbose)
strcpy(backup + len - 18, "BACKUP/");
strcpy(backup + len - 18 + 7, path + len - 18);
- cl = _clpi_parse(backup, verbose);
+ cl = _clpi_parse(backup);
X_FREE(backup);
}
diff --git a/src/libbluray/bdnav/clpi_parse.h b/src/libbluray/bdnav/clpi_parse.h
index b81fa8b..7f92ae3 100644
--- a/src/libbluray/bdnav/clpi_parse.h
+++ b/src/libbluray/bdnav/clpi_parse.h
@@ -27,7 +27,7 @@
BD_PRIVATE uint32_t clpi_lookup_spn(const CLPI_CL *cl, uint32_t timestamp, int before, uint8_t stc_id);
BD_PRIVATE uint32_t clpi_access_point(const CLPI_CL *cl, uint32_t pkt, int next, int angle_change, uint32_t *time);
-BD_PRIVATE CLPI_CL* clpi_parse(const char *path, int verbose);
+BD_PRIVATE CLPI_CL* clpi_parse(const char *path);
BD_PRIVATE CLPI_CL* clpi_copy(const CLPI_CL* src_cl);
BD_PRIVATE void clpi_free(CLPI_CL *cl);
diff --git a/src/libbluray/bdnav/mpls_parse.c b/src/libbluray/bdnav/mpls_parse.c
index e4d161e..0eb94b2 100644
--- a/src/libbluray/bdnav/mpls_parse.c
+++ b/src/libbluray/bdnav/mpls_parse.c
@@ -31,8 +31,6 @@
#define MPLS_SIG2A ('0' << 24 | '2' << 16 | '0' << 8 | '0')
#define MPLS_SIG2B ('0' << 24 | '1' << 16 | '0' << 8 | '0')
-static int mpls_verbose = 0;
-
static void
_human_readable_sig(char *sig, uint32_t s1, uint32_t s2)
{
@@ -879,14 +877,12 @@ _parse_mpls_extension(BITSTREAM *bits, int id1, int id2, void *handle)
}
static MPLS_PL*
-_mpls_parse(const char *path, int verbose)
+_mpls_parse(const char *path)
{
BITSTREAM bits;
BD_FILE_H *fp;
MPLS_PL *pl = NULL;
- mpls_verbose = verbose;
-
pl = calloc(1, sizeof(MPLS_PL));
if (pl == NULL) {
return NULL;
@@ -927,9 +923,9 @@ _mpls_parse(const char *path, int verbose)
}
MPLS_PL*
-mpls_parse(const char *path, int verbose)
+mpls_parse(const char *path)
{
- MPLS_PL *pl = _mpls_parse(path, verbose);
+ MPLS_PL *pl = _mpls_parse(path);
/* if failed, try backup file */
if (!pl) {
@@ -940,7 +936,7 @@ mpls_parse(const char *path, int verbose)
strcpy(backup + len - 19, "BACKUP/");
strcpy(backup + len - 19 + 7, path + len - 19);
- pl = _mpls_parse(backup, verbose);
+ pl = _mpls_parse(backup);
X_FREE(backup);
}
diff --git a/src/libbluray/bdnav/mpls_parse.h b/src/libbluray/bdnav/mpls_parse.h
index 588fff8..6922961 100644
--- a/src/libbluray/bdnav/mpls_parse.h
+++ b/src/libbluray/bdnav/mpls_parse.h
@@ -176,7 +176,7 @@ typedef struct
} MPLS_PL;
-BD_PRIVATE MPLS_PL* mpls_parse(const char *path, int verbose);
+BD_PRIVATE MPLS_PL* mpls_parse(const char *path);
BD_PRIVATE void mpls_free(MPLS_PL *pl);
BD_PRIVATE int mpls_parse_uo(uint8_t *buf, BD_UO_MASK *uo);
diff --git a/src/libbluray/bdnav/navigation.c b/src/libbluray/bdnav/navigation.c
index b4e6971..7dcedb0 100644
--- a/src/libbluray/bdnav/navigation.c
+++ b/src/libbluray/bdnav/navigation.c
@@ -161,7 +161,7 @@ NAV_TITLE_LIST* nav_get_title_list(const char *root, uint32_t flags, uint32_t mi
}
pl_list = tmp;
}
- pl = mpls_parse(path, 0);
+ pl = mpls_parse(path);
X_FREE(path);
if (pl != NULL) {
if ((flags & TITLES_FILTER_DUP_TITLE) &&
@@ -255,7 +255,7 @@ char* nav_find_main_title(const char *root)
}
pl_list = tmp;
}
- pl = mpls_parse(path, 0);
+ pl = mpls_parse(path);
X_FREE(path);
if (pl != NULL) {
if (_filter_dup(pl_list, ii, pl) &&
@@ -421,7 +421,7 @@ static void _fill_clip(NAV_TITLE *title,
path = str_printf("%s"DIR_SEP"BDMV"DIR_SEP"CLIPINF"DIR_SEP"%s.clpi",
title->root, mpls_clip[clip->angle].clip_id);
clpi_free(clip->cl);
- clip->cl = clpi_parse(path, 0);
+ clip->cl = clpi_parse(path);
X_FREE(path);
if (clip->cl == NULL) {
clip->start_pkt = 0;
@@ -473,7 +473,7 @@ NAV_TITLE* nav_title_open(const char *root, const char *playlist, unsigned angle
root, playlist);
title->angle_count = 0;
title->angle = angle;
- title->pl = mpls_parse(path, 0);
+ title->pl = mpls_parse(path);
if (title->pl == NULL) {
BD_DEBUG(DBG_NAV, "Fail: Playlist parse %s\n", path);
X_FREE(title);
More information about the libbluray-devel
mailing list