[Bug 690097] New: resindvd: Handle non-utf8 dvd title string correctly

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Dec 12 05:10:16 PST 2012


https://bugzilla.gnome.org/show_bug.cgi?id=690097
  GStreamer | gst-plugins-bad | git

           Summary: resindvd: Handle non-utf8 dvd title string correctly
    Classification: Platform
           Product: GStreamer
           Version: git
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-bad
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: sundararaj.reel at googlemail.com
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


gst-launch playbin2 uri=dvd://

When playing a DVD with non-utf8 title string, a runtime warning thrown:
"GStreamer-WARNING **: Trying to set string on taglist field 'title', but
string is not valid UTF-8. Please file a bug."

Warning likely from this code in gst-plugins-bad/ext/resindvd
resindvdsrc.c:881 GstTagList *tags = gst_tag_list_new (GST_TAG_TITLE,
title_str, NULL);

In such DVDs, the "DVD Menu, <dvd name>" title is not known to the playbin2
elements. So, there is no way for other elements to know when the dvd menu is
open.


A possible fix for this issue, is to replace non-utf8 chars with '?' in the
disc_name/dvd-title.


diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c
index f13418a..5b3ef7e 100644
--- a/ext/resindvd/resindvdsrc.c
+++ b/ext/resindvd/resindvdsrc.c
@@ -399,6 +399,11 @@ rsn_dvdsrc_start (GstBaseSrc * bsrc)

   dvdnav_get_title_string (src->dvdnav, &src->disc_name);

+ /* ensure the disc name is a valid utf8 string */
+ const gchar* end = NULL;
+ while (g_utf8_validate(src->disc_name, -1, &end) == FALSE && end)
+ *((gchar*)end) = '?';
+
   src->first_seek = TRUE;
   src->running = TRUE;
   src->branching = FALSE;

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list