summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2009-10-05 11:46:08 +0100
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2009-10-05 11:46:08 +0100
commit45ff9057712f11e2737b37e040bea99bc51934e9 (patch)
tree26f9150741b15608c008d8a5a44922e3ed8e1079 /gst
parentc7b5df91a9182108274bc893ad9310dc0a5029ee (diff)
qtdemux: make sure compatible brands buffer exists before dereferencing it
Diffstat (limited to 'gst')
-rw-r--r--gst/qtdemux/qtdemux.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c
index 5be8a174..8f1ebd1a 100644
--- a/gst/qtdemux/qtdemux.c
+++ b/gst/qtdemux/qtdemux.c
@@ -4844,7 +4844,7 @@ qtdemux_is_brand_3gp (GstQTDemux * qtdemux, gboolean major)
if (major) {
return ((qtdemux->major_brand & GST_MAKE_FOURCC (255, 255, 0, 0)) ==
GST_MAKE_FOURCC ('3', 'g', 0, 0));
- } else {
+ } else if (qtdemux->comp_brands != NULL) {
guint8 *data = GST_BUFFER_DATA (qtdemux->comp_brands);
guint size = GST_BUFFER_SIZE (qtdemux->comp_brands);
gboolean res = FALSE;
@@ -4856,6 +4856,8 @@ qtdemux_is_brand_3gp (GstQTDemux * qtdemux, gboolean major)
size -= 4;
}
return res;
+ } else {
+ return FALSE;
}
}