mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
mxfdemux: Post an error message if we got EOS before having any source pads
Otherwise, sending an EOS event has no effect and the application waits forever for something to happen.
This commit is contained in:
parent
55043aff12
commit
88e060743a
1 changed files with 11 additions and 1 deletions
|
@ -3068,7 +3068,11 @@ pause:
|
|||
|
||||
if (flow == GST_FLOW_EOS) {
|
||||
/* perform EOS logic */
|
||||
if (demux->segment.flags & GST_SEEK_FLAG_SEGMENT) {
|
||||
if (demux->src->len == 0) {
|
||||
GST_ELEMENT_ERROR (demux, STREAM, WRONG_TYPE,
|
||||
("This stream contains no data."),
|
||||
("got eos and didn't find any streams"));
|
||||
} else if (demux->segment.flags & GST_SEEK_FLAG_SEGMENT) {
|
||||
gint64 stop;
|
||||
GstMessage *m;
|
||||
GstEvent *e;
|
||||
|
@ -4084,6 +4088,12 @@ gst_mxf_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
|||
GstMXFDemuxPad *p = NULL;
|
||||
guint i;
|
||||
|
||||
if (demux->src->len == 0) {
|
||||
GST_ELEMENT_ERROR (demux, STREAM, WRONG_TYPE,
|
||||
("This stream contains no data."),
|
||||
("got eos and didn't find any streams"));
|
||||
}
|
||||
|
||||
for (i = 0; i < demux->essence_tracks->len; i++) {
|
||||
GstMXFDemuxEssenceTrack *t =
|
||||
&g_array_index (demux->essence_tracks, GstMXFDemuxEssenceTrack, i);
|
||||
|
|
Loading…
Reference in a new issue