mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
ffmpegdemux: Don't use GST_FLOW_IS_FATAL() and GST_FLOW_IS_SUCCESS()
This commit is contained in:
parent
d515696ae9
commit
37357063bf
1 changed files with 16 additions and 18 deletions
|
@ -919,7 +919,7 @@ gst_ffmpegdemux_aggregated_flow (GstFFMpegDemux * demux)
|
||||||
if (s) {
|
if (s) {
|
||||||
res = MIN (res, s->last_flow);
|
res = MIN (res, s->last_flow);
|
||||||
|
|
||||||
if (GST_FLOW_IS_SUCCESS (s->last_flow))
|
if (s->last_flow == GST_FLOW_OK)
|
||||||
have_ok = TRUE;
|
have_ok = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1494,28 +1494,26 @@ pause:
|
||||||
GST_FFMPEG_PIPE_MUTEX_UNLOCK (ffpipe);
|
GST_FFMPEG_PIPE_MUTEX_UNLOCK (ffpipe);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GST_FLOW_IS_FATAL (ret) || ret == GST_FLOW_NOT_LINKED) {
|
if (ret == GST_FLOW_UNEXPECTED) {
|
||||||
if (ret == GST_FLOW_UNEXPECTED) {
|
if (demux->segment.flags & GST_SEEK_FLAG_SEGMENT) {
|
||||||
if (demux->segment.flags & GST_SEEK_FLAG_SEGMENT) {
|
gint64 stop;
|
||||||
gint64 stop;
|
|
||||||
|
|
||||||
if ((stop = demux->segment.stop) == -1)
|
if ((stop = demux->segment.stop) == -1)
|
||||||
stop = demux->segment.duration;
|
stop = demux->segment.duration;
|
||||||
|
|
||||||
GST_LOG_OBJECT (demux, "posting segment done");
|
GST_LOG_OBJECT (demux, "posting segment done");
|
||||||
gst_element_post_message (GST_ELEMENT (demux),
|
gst_element_post_message (GST_ELEMENT (demux),
|
||||||
gst_message_new_segment_done (GST_OBJECT (demux),
|
gst_message_new_segment_done (GST_OBJECT (demux),
|
||||||
demux->segment.format, stop));
|
demux->segment.format, stop));
|
||||||
} else {
|
|
||||||
GST_LOG_OBJECT (demux, "pushing eos");
|
|
||||||
gst_ffmpegdemux_push_event (demux, gst_event_new_eos ());
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
GST_ELEMENT_ERROR (demux, STREAM, FAILED,
|
GST_LOG_OBJECT (demux, "pushing eos");
|
||||||
("Internal data stream error."),
|
|
||||||
("streaming stopped, reason %s", gst_flow_get_name (ret)));
|
|
||||||
gst_ffmpegdemux_push_event (demux, gst_event_new_eos ());
|
gst_ffmpegdemux_push_event (demux, gst_event_new_eos ());
|
||||||
}
|
}
|
||||||
|
} else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_UNEXPECTED) {
|
||||||
|
GST_ELEMENT_ERROR (demux, STREAM, FAILED,
|
||||||
|
("Internal data stream error."),
|
||||||
|
("streaming stopped, reason %s", gst_flow_get_name (ret)));
|
||||||
|
gst_ffmpegdemux_push_event (demux, gst_event_new_eos ());
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue