diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | gst/qtdemux/qtdemux.c | 10 |
2 files changed, 11 insertions, 4 deletions
@@ -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); |