baseparse: specific EOS handling if no output so far

This commit is contained in:
Mark Nauwelaerts 2010-09-20 13:57:55 +02:00
parent a1c072e0aa
commit 1c14fd0a31

View file

@ -686,6 +686,17 @@ gst_base_parse_sink_eventfunc (GstBaseParse * parse, GstEvent * event)
case GST_EVENT_EOS: case GST_EVENT_EOS:
gst_base_parse_drain (parse); gst_base_parse_drain (parse);
/* If we STILL have zero frames processed, fire an error */
if (parse->priv->framecount == 0) {
GST_ELEMENT_ERROR (parse, STREAM, WRONG_TYPE,
("No valid frames found before end of stream"), (NULL));
}
/* newsegment before eos */
if (parse->pending_segment) {
gst_pad_push_event (parse->srcpad, parse->pending_segment);
parse->pending_segment = NULL;
}
break; break;
default: default: