summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/resindvd/Makefile.am1
-rw-r--r--ext/resindvd/resindvdsrc.c11
-rw-r--r--ext/resindvd/resindvdsrc.h2
3 files changed, 12 insertions, 2 deletions
diff --git a/ext/resindvd/Makefile.am b/ext/resindvd/Makefile.am
index bc51f9b13..1dceac6c2 100644
--- a/ext/resindvd/Makefile.am
+++ b/ext/resindvd/Makefile.am
@@ -18,6 +18,7 @@ $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) \
$(GST_CFLAGS) $(DVDNAV_CFLAGS)
libgstresindvd_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
-lgstvideo-$(GST_API_VERSION) -lgstpbutils-$(GST_API_VERSION) \
+-lgsttag-$(GST_API_VERSION) \
$(GST_BASE_LIBS) $(GST_LIBS) $(GMODULE_NO_EXPORT_LIBS) $(DVDNAV_LIBS)
libgstresindvd_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstresindvd_la_LIBTOOLFLAGS = --tag=disable-static
diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c
index f13418a13..cb43e2a67 100644
--- a/ext/resindvd/resindvdsrc.c
+++ b/ext/resindvd/resindvdsrc.c
@@ -30,6 +30,7 @@
#include <gst/gst-i18n-plugin.h>
#include <gst/video/video.h>
#include <gst/video/navigation.h>
+#include <gst/tag/tag.h>
#include "resindvdsrc.h"
@@ -351,6 +352,7 @@ rsn_dvdsrc_start (GstBaseSrc * bsrc)
{
resinDvdSrc *src = RESINDVDSRC (bsrc);
const gchar *const *langs, *const *cur;
+ const char *disc_name;
gchar lang[8];
g_mutex_lock (src->dvd_lock);
@@ -397,7 +399,13 @@ rsn_dvdsrc_start (GstBaseSrc * bsrc)
}
}
- dvdnav_get_title_string (src->dvdnav, &src->disc_name);
+ /* Get disc name and convert to UTF-8 */
+ g_free (src->disc_name);
+ dvdnav_get_title_string (src->dvdnav, &disc_name);
+ if (disc_name != NULL && *disc_name != '\0')
+ src->disc_name = gst_tag_freeform_string_to_utf8 (disc_name, -1, NULL);
+ else
+ src->disc_name = NULL;
src->first_seek = TRUE;
src->running = TRUE;
@@ -576,6 +584,7 @@ rsn_dvdsrc_stop (GstBaseSrc * bsrc)
src->highlight_event = NULL;
}
+ g_free (src->disc_name);
src->disc_name = NULL;
if (src->dvdnav) {
diff --git a/ext/resindvd/resindvdsrc.h b/ext/resindvd/resindvdsrc.h
index e53fb2b12..5804c07b2 100644
--- a/ext/resindvd/resindvdsrc.h
+++ b/ext/resindvd/resindvdsrc.h
@@ -58,7 +58,7 @@ struct _resinDvdSrc
gchar *device;
dvdnav_t *dvdnav;
- const char *disc_name;
+ gchar *disc_name;
/* dvd_reader instance is used to load and cache VTS/VMG ifo info */
dvd_reader_t *dvdread;