configure.ac: check for kdemacros.h, too (should fix #141821)
authorBenjamin Otte <otte@gnome.org>
Tue, 4 May 2004 18:38:39 +0000 (18:38 +0000)
committerBenjamin Otte <otte@gnome.org>
Tue, 4 May 2004 18:38:39 +0000 (18:38 +0000)
Original commit message from CVS:
* configure.ac:
check for kdemacros.h, too (should fix #141821)
* ext/vorbis/vorbisdec.c: (vorbis_dec_event), (vorbis_dec_chain):
don't crash if no header was sent, but nicely error out (fixes part
of #141554)

ChangeLog
configure.ac
ext/vorbis/vorbisdec.c

index eb1259c..1e8a4cd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2004-05-04  Benjamin Otte  <otte@gnome.org>
+
+       * configure.ac:
+         check for kdemacros.h, too (should fix #141821)
+       * ext/vorbis/vorbisdec.c: (vorbis_dec_event), (vorbis_dec_chain):
+         don't crash if no header was sent, but nicely error out (fixes part
+         of #141554)
+
 2004-05-04  Wim Taymans  <wim@fluendo.com>
 
        * ext/mpeg2enc/gstmpeg2enc.cc: (gst_mpeg2enc_dispose): call the
index 6d9b330..7027639 100644 (file)
@@ -1066,7 +1066,7 @@ GST_CHECK_FEATURE(KIO, [kio], kio, [
   fi
 
   for dir in $kde_include_dirs; do
-    if test -r "$dir/kglobal.h"; then
+    if test -r "$dir/kglobal.h" && test -r "$dir/kdemacros.h"; then
       kde_include_dir=$dir
       break
     fi
index f7da654..d0fd119 100644 (file)
@@ -395,6 +395,12 @@ vorbis_dec_chain (GstPad * pad, GstData * data)
     float **pcm;
     guint sample_count;
 
+    if (packet.packetno < 3) {
+      GST_ELEMENT_ERROR (GST_ELEMENT (vd), STREAM, DECODE,
+          (NULL), ("no header sent yet (packet no is %d)", packet.packetno));
+      gst_data_unref (data);
+      return;
+    }
     /* normal data packet */
     if (vorbis_synthesis (&vd->vb, &packet)) {
       GST_ELEMENT_ERROR (GST_ELEMENT (vd), STREAM, DECODE,