flvdemux: Post error message if EOS before pads were created
Happens with some files with only headers
This commit is contained in:
parent
5ba30e6111
commit
5294edded2
@ -2472,7 +2472,10 @@ pause:
|
|||||||
}
|
}
|
||||||
|
|
||||||
GST_LOG_OBJECT (demux, "Sending EOS, at end of stream");
|
GST_LOG_OBJECT (demux, "Sending EOS, at end of stream");
|
||||||
if (!gst_flv_demux_push_src_event (demux, gst_event_new_eos ()))
|
if (!demux->audio_pad && !demux->video_pad)
|
||||||
|
GST_ELEMENT_ERROR (demux, STREAM, FAILED,
|
||||||
|
("Internal data stream error."), ("Got EOS before any data"));
|
||||||
|
else if (!gst_flv_demux_push_src_event (demux, gst_event_new_eos ()))
|
||||||
GST_WARNING_OBJECT (demux, "failed pushing EOS on streams");
|
GST_WARNING_OBJECT (demux, "failed pushing EOS on streams");
|
||||||
}
|
}
|
||||||
} else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS) {
|
} else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS) {
|
||||||
@ -2936,6 +2939,11 @@ gst_flv_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
|||||||
gst_index_commit (index, demux->index_id);
|
gst_index_commit (index, demux->index_id);
|
||||||
gst_object_unref (index);
|
gst_object_unref (index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!demux->audio_pad && !demux->video_pad)
|
||||||
|
GST_ELEMENT_ERROR (demux, STREAM, FAILED,
|
||||||
|
("Internal data stream error."), ("Got EOS before any data"));
|
||||||
|
else {
|
||||||
if (!demux->no_more_pads) {
|
if (!demux->no_more_pads) {
|
||||||
gst_element_no_more_pads (GST_ELEMENT (demux));
|
gst_element_no_more_pads (GST_ELEMENT (demux));
|
||||||
demux->no_more_pads = TRUE;
|
demux->no_more_pads = TRUE;
|
||||||
@ -2943,6 +2951,7 @@ gst_flv_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
|||||||
|
|
||||||
if (!gst_flv_demux_push_src_event (demux, event))
|
if (!gst_flv_demux_push_src_event (demux, event))
|
||||||
GST_WARNING_OBJECT (demux, "failed pushing EOS on streams");
|
GST_WARNING_OBJECT (demux, "failed pushing EOS on streams");
|
||||||
|
}
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user