Program received signal SIGSEGV, Segmentation fault.
rygel_media_export_dvd_container_real_constructed (base=0x555556ff6350) at rygel-media-export-dvd-container.c:345
345 _tmp8_ = _tmp7_->children;
(gdb) list
340 _tmp5_ = gupnp_xml_doc_new (_tmp4_);
341 _g_object_unref0 (self->priv->doc);
342 self->priv->doc = _tmp5_;
343 _tmp6_ = doc;
344 _tmp7_ = xmlDocGetRootElement (_tmp6_);
345 _tmp8_ = _tmp7_->children;
346 it = _tmp8_;
347 child_count = 0;
348 while (TRUE) {
349 xmlNode* _tmp9_ = NULL;
The below change *avoided* the crash:
diff --git a/src/plugins/media-export/rygel-media-export-dvd-container.vala b/src/plugins/media-export/rygel-media-export-dvd-container.vala
index 7e60cf1..f204da0 100644
--- a/src/plugins/media-export/rygel-media-export-dvd-container.vala
+++ b/src/plugins/media-export/rygel-media-export-dvd-container.vala
@@ -51,17 +51,21 @@ internal class Rygel.MediaExport.DVDContainer : SimpleContainer, UpdatableObject
Xml.ParserOption.NOERROR |
Xml.ParserOption.NOWARNING);
this.doc = new GUPnP.XMLDoc (doc);
- var it = doc->get_root_element ()->children;
var child_count = 0;
- while (it != null) {
- if (it->name == "title") {
- this.title = it->children->content;
- } else if (it->name == "track") {
- child_count++;
- }
+ if (doc->get_root_element () != null)
+ {
+ var it = doc->get_root_element ()->children;
- it = it->next;
+ while (it != null) {
+ if (it->name == "title") {
+ this.title = it->children->content;
+ } else if (it->name == "track") {
+ child_count++;
+ }
+
+ it = it->next;
+ }
}
This got me further but once I access a chapter in a DVD I got the below crash where src was null
--- a/src/media-engines/gstreamer/rygel-gst-utils.vala
+++ b/src/media-engines/gstreamer/rygel-gst-utils.vala
@@ -63,16 +63,19 @@ internal abstract class Rygel.GstUtils {
src = "" (URIType.SRC, uri, null);
}
- if (src.get_class ().find_property ("blocksize") != null) {
- // The default is usually 4KiB which is not really big enough
- // for most cases so we set this to 65KiB.
- src.blocksize = (long) 65536;
- }
+ if (src != null)
+ {
+ if (src.get_class ().find_property ("blocksize") != null) {
+ // The default is usually 4KiB which is not really big enough
+ // for most cases so we set this to 65KiB.
+ src.blocksize = (long) 65536;
+ }
- if (src.get_class ().find_property ("tcp-timeout") != null) {
- // For rtspsrc since some RTSP sources takes a while to start
- // transmitting
- src.tcp_timeout = (int64) 60000000;
+ if (src.get_class ().find_property ("tcp-timeout") != null) {
+ // For rtspsrc since some RTSP sources takes a while to start
+ // transmitting
+ src.tcp_timeout = (int64) 60000000;
+ }
}
Any ideas on how to get the dvd iso's to actually work?
-- john