mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
flvdemux: Don't use GST_FLOW_IS_FATAL()
This commit is contained in:
parent
1ce0b2dfc7
commit
78eca34a6d
1 changed files with 44 additions and 46 deletions
|
@ -111,11 +111,11 @@ gst_flv_demux_parse_and_add_index_entry (GstFlvDemux * demux, GstClockTime ts,
|
||||||
gboolean key;
|
gboolean key;
|
||||||
|
|
||||||
gst_index_entry_assoc_map (entry, GST_FORMAT_TIME, &time);
|
gst_index_entry_assoc_map (entry, GST_FORMAT_TIME, &time);
|
||||||
key = !!(GST_INDEX_ASSOC_FLAGS (entry) & GST_ASSOCIATION_FLAG_KEY_UNIT);
|
key = ! !(GST_INDEX_ASSOC_FLAGS (entry) & GST_ASSOCIATION_FLAG_KEY_UNIT);
|
||||||
GST_LOG_OBJECT (demux, "position already mapped to time %" GST_TIME_FORMAT
|
GST_LOG_OBJECT (demux, "position already mapped to time %" GST_TIME_FORMAT
|
||||||
", keyframe %d", GST_TIME_ARGS (time), key);
|
", keyframe %d", GST_TIME_ARGS (time), key);
|
||||||
/* there is not really a way to delete the existing one */
|
/* there is not really a way to delete the existing one */
|
||||||
if (time != ts || key != !!keyframe)
|
if (time != ts || key != ! !keyframe)
|
||||||
GST_DEBUG_OBJECT (demux, "metadata mismatch");
|
GST_DEBUG_OBJECT (demux, "metadata mismatch");
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
|
@ -2237,7 +2237,6 @@ pause:
|
||||||
GST_LOG_OBJECT (demux, "pausing task, reason %s", reason);
|
GST_LOG_OBJECT (demux, "pausing task, reason %s", reason);
|
||||||
gst_pad_pause_task (pad);
|
gst_pad_pause_task (pad);
|
||||||
|
|
||||||
if (GST_FLOW_IS_FATAL (ret) || ret == GST_FLOW_NOT_LINKED) {
|
|
||||||
if (ret == GST_FLOW_UNEXPECTED) {
|
if (ret == GST_FLOW_UNEXPECTED) {
|
||||||
/* perform EOS logic */
|
/* perform EOS logic */
|
||||||
if (!demux->no_more_pads) {
|
if (!demux->no_more_pads) {
|
||||||
|
@ -2276,13 +2275,12 @@ pause:
|
||||||
if (!gst_flv_demux_push_src_event (demux, gst_event_new_eos ()))
|
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 {
|
} else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_UNEXPECTED) {
|
||||||
GST_ELEMENT_ERROR (demux, STREAM, FAILED,
|
GST_ELEMENT_ERROR (demux, STREAM, FAILED,
|
||||||
("Internal data stream error."),
|
("Internal data stream error."),
|
||||||
("stream stopped, reason %s", reason));
|
("stream stopped, reason %s", reason));
|
||||||
gst_flv_demux_push_src_event (demux, gst_event_new_eos ());
|
gst_flv_demux_push_src_event (demux, gst_event_new_eos ());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
gst_object_unref (demux);
|
gst_object_unref (demux);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2347,9 +2345,9 @@ flv_demux_handle_seek_push (GstFlvDemux * demux, GstEvent * event)
|
||||||
if (format != GST_FORMAT_TIME)
|
if (format != GST_FORMAT_TIME)
|
||||||
goto wrong_format;
|
goto wrong_format;
|
||||||
|
|
||||||
flush = !!(flags & GST_SEEK_FLAG_FLUSH);
|
flush = ! !(flags & GST_SEEK_FLAG_FLUSH);
|
||||||
/* FIXME : the keyframe flag is never used ! */
|
/* FIXME : the keyframe flag is never used ! */
|
||||||
keyframe = !!(flags & GST_SEEK_FLAG_KEY_UNIT);
|
keyframe = ! !(flags & GST_SEEK_FLAG_KEY_UNIT);
|
||||||
|
|
||||||
/* Work on a copy until we are sure the seek succeeded. */
|
/* Work on a copy until we are sure the seek succeeded. */
|
||||||
memcpy (&seeksegment, &demux->segment, sizeof (GstSegment));
|
memcpy (&seeksegment, &demux->segment, sizeof (GstSegment));
|
||||||
|
@ -2513,9 +2511,9 @@ gst_flv_demux_handle_seek_pull (GstFlvDemux * demux, GstEvent * event,
|
||||||
demux->seeking = seeking;
|
demux->seeking = seeking;
|
||||||
GST_OBJECT_UNLOCK (demux);
|
GST_OBJECT_UNLOCK (demux);
|
||||||
|
|
||||||
flush = !!(flags & GST_SEEK_FLAG_FLUSH);
|
flush = ! !(flags & GST_SEEK_FLAG_FLUSH);
|
||||||
/* FIXME : the keyframe flag is never used */
|
/* FIXME : the keyframe flag is never used */
|
||||||
keyframe = !!(flags & GST_SEEK_FLAG_KEY_UNIT);
|
keyframe = ! !(flags & GST_SEEK_FLAG_KEY_UNIT);
|
||||||
|
|
||||||
if (flush) {
|
if (flush) {
|
||||||
/* Flush start up and downstream to make sure data flow and loops are
|
/* Flush start up and downstream to make sure data flow and loops are
|
||||||
|
|
Loading…
Reference in a new issue