summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2008-02-04 12:07:14 +0000
committerEdward Hervey <bilboed@bilboed.com>2008-02-04 12:07:14 +0000
commit87eb1f391dac811ea071a0a313ff02ca532c73f5 (patch)
tree80c850926ac1943a1af5ee4003eb53541f1f5112
parent2fced64b4f4fa5fd799f322f63a3e993e1fe2db2 (diff)
gst/avi/gstavidemux.c: If there's no entries in the subindex, don't try to do anything stupid, just return.
Original commit message from CVS: * gst/avi/gstavidemux.c: (gst_avi_demux_parse_subindex): If there's no entries in the subindex, don't try to do anything stupid, just return.
-rw-r--r--ChangeLog6
-rw-r--r--gst/avi/gstavidemux.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index bb6885e5..6b94c8fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-02-04 Edward Hervey <edward.hervey@collabora.co.uk>
+
+ * gst/avi/gstavidemux.c: (gst_avi_demux_parse_subindex):
+ If there's no entries in the subindex, don't try to do anything stupid,
+ just return.
+
2008-02-02 Tim-Philipp Müller <tim at centricular dot net>
Patch by: John Millikin <jmillikin at gmail dot com>
diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c
index d68b5376..5e7eacc0 100644
--- a/gst/avi/gstavidemux.c
+++ b/gst/avi/gstavidemux.c
@@ -979,6 +979,10 @@ gst_avi_demux_parse_subindex (GstAviDemux * avi,
num = GST_READ_UINT32_LE (&data[4]);
baseoff = GST_READ_UINT64_LE (&data[12]);
+ /* If there's nothing, just return ! */
+ if (num == 0)
+ return TRUE;
+
if (!(entries = g_try_new (gst_avi_index_entry, num)))
goto out_of_mem;