From 39e1d5c6a54d35a97b09867e91926dc19a7cdf1e Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 4 May 2004 18:38:39 +0000 Subject: [PATCH] configure.ac: check for kdemacros.h, too (should fix #141821) 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 | 8 ++++++++ configure.ac | 2 +- ext/vorbis/vorbisdec.c | 6 ++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index eb1259c..1e8a4cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-05-04 Benjamin Otte + + * 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 * ext/mpeg2enc/gstmpeg2enc.cc: (gst_mpeg2enc_dispose): call the diff --git a/configure.ac b/configure.ac index 6d9b330..7027639 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/ext/vorbis/vorbisdec.c b/ext/vorbis/vorbisdec.c index f7da654..d0fd119 100644 --- a/ext/vorbis/vorbisdec.c +++ b/ext/vorbis/vorbisdec.c @@ -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, -- 2.7.4