matroskademux: Don't use GST_FLOW_IS_FATAL()
This commit is contained in:
parent
1243b76df7
commit
e8743b3789
@ -2059,7 +2059,7 @@ gst_matroska_demux_query (GstMatroskaDemux * demux, GstPad * pad,
|
|||||||
/* assuming we'll be able to get an index ... */
|
/* assuming we'll be able to get an index ... */
|
||||||
seekable = demux->seekable;
|
seekable = demux->seekable;
|
||||||
} else {
|
} else {
|
||||||
seekable = !!demux->index;
|
seekable = ! !demux->index;
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_query_set_seeking (query, GST_FORMAT_TIME, seekable,
|
gst_query_set_seeking (query, GST_FORMAT_TIME, seekable,
|
||||||
@ -2599,8 +2599,8 @@ gst_matroska_demux_handle_seek_event (GstMatroskaDemux * demux,
|
|||||||
entry->pos + demux->ebml_segment_start);
|
entry->pos + demux->ebml_segment_start);
|
||||||
}
|
}
|
||||||
|
|
||||||
flush = !!(flags & GST_SEEK_FLAG_FLUSH);
|
flush = ! !(flags & GST_SEEK_FLAG_FLUSH);
|
||||||
keyunit = !!(flags & GST_SEEK_FLAG_KEY_UNIT);
|
keyunit = ! !(flags & GST_SEEK_FLAG_KEY_UNIT);
|
||||||
|
|
||||||
if (flush) {
|
if (flush) {
|
||||||
GST_DEBUG_OBJECT (demux, "Starting flush");
|
GST_DEBUG_OBJECT (demux, "Starting flush");
|
||||||
@ -5886,14 +5886,12 @@ eos:
|
|||||||
pause:
|
pause:
|
||||||
{
|
{
|
||||||
const gchar *reason = gst_flow_get_name (ret);
|
const gchar *reason = gst_flow_get_name (ret);
|
||||||
|
gboolean push_eos = FALSE;
|
||||||
|
|
||||||
GST_LOG_OBJECT (demux, "pausing task, reason %s", reason);
|
GST_LOG_OBJECT (demux, "pausing task, reason %s", reason);
|
||||||
demux->segment_running = FALSE;
|
demux->segment_running = FALSE;
|
||||||
gst_pad_pause_task (demux->sinkpad);
|
gst_pad_pause_task (demux->sinkpad);
|
||||||
|
|
||||||
if (GST_FLOW_IS_FATAL (ret) || ret == GST_FLOW_NOT_LINKED) {
|
|
||||||
gboolean push_eos = TRUE;
|
|
||||||
|
|
||||||
if (ret == GST_FLOW_UNEXPECTED) {
|
if (ret == GST_FLOW_UNEXPECTED) {
|
||||||
/* perform EOS logic */
|
/* perform EOS logic */
|
||||||
|
|
||||||
@ -5922,12 +5920,14 @@ pause:
|
|||||||
gst_element_post_message (GST_ELEMENT (demux),
|
gst_element_post_message (GST_ELEMENT (demux),
|
||||||
gst_message_new_segment_done (GST_OBJECT (demux), GST_FORMAT_TIME,
|
gst_message_new_segment_done (GST_OBJECT (demux), GST_FORMAT_TIME,
|
||||||
stop));
|
stop));
|
||||||
push_eos = FALSE;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
|
push_eos = TRUE;
|
||||||
|
}
|
||||||
|
} else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_UNEXPECTED) {
|
||||||
/* for fatal errors we post an error message */
|
/* for fatal errors we post an error message */
|
||||||
GST_ELEMENT_ERROR (demux, STREAM, FAILED, (NULL),
|
GST_ELEMENT_ERROR (demux, STREAM, FAILED, (NULL),
|
||||||
("stream stopped, reason %s", reason));
|
("stream stopped, reason %s", reason));
|
||||||
|
push_eos = TRUE;
|
||||||
}
|
}
|
||||||
if (push_eos) {
|
if (push_eos) {
|
||||||
/* send EOS, and prevent hanging if no streams yet */
|
/* send EOS, and prevent hanging if no streams yet */
|
||||||
@ -5938,7 +5938,6 @@ pause:
|
|||||||
(NULL), ("got eos but no streams (yet)"));
|
(NULL), ("got eos but no streams (yet)"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user