summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2004-09-13 19:38:42 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2004-09-13 19:38:42 +0000
commitfe20ee421865cc8a7a98b2eaaa60fa288a0f527c (patch)
tree495d20ff1812bcd19b4d5af8c2e36b8943280bdc
parente24bb3990d5967142a4cb4f2f00bca2c87a408a9 (diff)
downloadgst-plugins-bad-fe20ee421865cc8a7a98b2eaaa60fa288a0f527c.tar.gz
gst-plugins-bad-fe20ee421865cc8a7a98b2eaaa60fa288a0f527c.tar.bz2
gst-plugins-bad-fe20ee421865cc8a7a98b2eaaa60fa288a0f527c.zip
gst/qtdemux/qtdemux.c: Don't touch non-existing data (fixes crash on file in #140147).
Original commit message from CVS: * gst/qtdemux/qtdemux.c: (qtdemux_audio_caps): Don't touch non-existing data (fixes crash on file in #140147).
-rw-r--r--ChangeLog5
-rw-r--r--gst/qtdemux/qtdemux.c10
2 files changed, 11 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index e803995d..c495c715 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2004-09-13 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+ * gst/qtdemux/qtdemux.c: (qtdemux_audio_caps):
+ Don't touch non-existing data (fixes crash on file in #140147).
+
+2004-09-13 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+
* gst/playback/gstplaybasebin.c:
(gst_play_base_bin_dispose), (gst_play_base_bin_set_property):
Handle double disposals, and proper change of URIs.
diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c
index 6b97ad29..e4a54f07 100644
--- a/gst/qtdemux/qtdemux.c
+++ b/gst/qtdemux/qtdemux.c
@@ -2525,10 +2525,12 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, guint32 fourcc, const guint8 * data,
"mpegversion", G_TYPE_INT, 4, NULL);
case GST_MAKE_FOURCC ('Q', 'D', 'M', '2'):
/* FIXME: QDesign music version 2 (no constant) */
- return gst_caps_new_simple ("audio/x-qdm2",
- "framesize", G_TYPE_INT, QTDEMUX_GUINT32_GET (data + 52),
- "bitrate", G_TYPE_INT, QTDEMUX_GUINT32_GET (data + 40),
- "blocksize", G_TYPE_INT, QTDEMUX_GUINT32_GET (data + 44), NULL);
+ if (data)
+ return gst_caps_new_simple ("audio/x-qdm2",
+ "framesize", G_TYPE_INT, QTDEMUX_GUINT32_GET (data + 52),
+ "bitrate", G_TYPE_INT, QTDEMUX_GUINT32_GET (data + 40),
+ "blocksize", G_TYPE_INT, QTDEMUX_GUINT32_GET (data + 44), NULL);
+ return gst_caps_new_simple ("audio/x-qdm2", NULL);
case GST_MAKE_FOURCC ('a', 'g', 's', 'm'):
/* GSM */
return gst_caps_new_simple ("audio/x-gsm", NULL);