From 1880c4145ec213b9bf2680145eed2344369c5edc Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Tue, 19 Jul 2011 12:05:51 +0200 Subject: [PATCH] auparse: avoid hanging on invalid short input ... as in such case there is no srcpad yet on which to forward EOS. --- gst/auparse/gstauparse.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gst/auparse/gstauparse.c b/gst/auparse/gstauparse.c index 69e5273192..d5a555536b 100644 --- a/gst/auparse/gstauparse.c +++ b/gst/auparse/gstauparse.c @@ -749,6 +749,12 @@ gst_au_parse_sink_event (GstPad * pad, GstEvent * event) gst_event_unref (event); break; } + case GST_EVENT_EOS: + if (!auparse->srcpad) { + GST_ELEMENT_ERROR (auparse, STREAM, WRONG_TYPE, + ("No valid input found before end of stream"), (NULL)); + } + /* fall-through */ default: ret = gst_pad_event_default (pad, event); break;