asfdemux: Only push EOS event if we're not doing a segment seek

https://bugzilla.gnome.org/show_bug.cgi?id=755469
This commit is contained in:
Sebastian Dröge 2015-09-23 19:37:43 +02:00
parent 42d7aec412
commit c526153ec9

View file

@ -1962,9 +1962,12 @@ eos:
return; return;
} }
} }
/* normal playback, send EOS to all linked pads */
GST_INFO_OBJECT (demux, "Sending EOS, at end of stream"); if (!(demux->segment.flags & GST_SEEK_FLAG_SEGMENT)) {
gst_asf_demux_send_event_unlocked (demux, gst_event_new_eos ()); /* normal playback, send EOS to all linked pads */
GST_INFO_OBJECT (demux, "Sending EOS, at end of stream");
gst_asf_demux_send_event_unlocked (demux, gst_event_new_eos ());
}
/* ... and fall through to pause */ /* ... and fall through to pause */
} }
pause: pause:
@ -1980,7 +1983,9 @@ pause:
GST_ELEMENT_ERROR (demux, STREAM, FAILED, GST_ELEMENT_ERROR (demux, STREAM, FAILED,
(_("Internal data stream error.")), (_("Internal data stream error.")),
("streaming stopped, reason %s", gst_flow_get_name (flow))); ("streaming stopped, reason %s", gst_flow_get_name (flow)));
gst_asf_demux_send_event_unlocked (demux, gst_event_new_eos ());
} }
return; return;
} }
@ -1988,7 +1993,6 @@ pause:
read_failed: read_failed:
{ {
GST_DEBUG_OBJECT (demux, "Read failed, doh"); GST_DEBUG_OBJECT (demux, "Read failed, doh");
gst_asf_demux_send_event_unlocked (demux, gst_event_new_eos ());
flow = GST_FLOW_EOS; flow = GST_FLOW_EOS;
goto pause; goto pause;
} }