mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 13:06:23 +00:00
cmmldec/enc: Don't use GST_FLOW_IS_FATAL()
And as a result, don't ignore WRONG_STATE and NOT_LINKED. Both mean that it's a good idea to pass them upstream instead of pretending that everything is good.
This commit is contained in:
parent
55a52262d3
commit
0753d9fee3
2 changed files with 5 additions and 7 deletions
|
@ -511,7 +511,7 @@ gst_cmml_dec_parse_first_header (GstCmmlDec * dec, GstBuffer * buffer)
|
|||
/* if there is a processing instruction, gst_cmml_dec_parse_preamble
|
||||
* will be triggered. Otherwise we need to call it manually.
|
||||
*/
|
||||
if (!GST_FLOW_IS_FATAL (dec->flow_return) && !dec->sent_root) {
|
||||
if (dec->flow_return != GST_FLOW_OK && !dec->sent_root) {
|
||||
guchar *preamble = (guchar *) g_strndup ((gchar *) GST_BUFFER_DATA (buffer),
|
||||
GST_BUFFER_SIZE (buffer));
|
||||
|
||||
|
@ -555,9 +555,7 @@ gst_cmml_dec_parse_preamble (GstCmmlDec * dec, guchar * preamble,
|
|||
dec->flow_return = gst_pad_push (dec->srcpad, buffer);
|
||||
}
|
||||
|
||||
if (dec->flow_return == GST_FLOW_NOT_LINKED)
|
||||
dec->flow_return = GST_FLOW_OK; /* Ignore NOT_LINKED */
|
||||
if (!GST_FLOW_IS_FATAL (dec->flow_return)) {
|
||||
if (dec->flow_return == GST_FLOW_OK) {
|
||||
GST_INFO_OBJECT (dec, "preamble parsed");
|
||||
}
|
||||
|
||||
|
|
|
@ -453,7 +453,7 @@ gst_cmml_enc_parse_tag_head (GstCmmlEnc * enc, GstCmmlTagHead * head)
|
|||
enc->flow_return = gst_cmml_enc_push (enc, buffer);
|
||||
headers = g_list_delete_link (headers, headers);
|
||||
|
||||
if (GST_FLOW_IS_FATAL (enc->flow_return))
|
||||
if (enc->flow_return != GST_FLOW_OK)
|
||||
goto push_error;
|
||||
}
|
||||
|
||||
|
@ -558,7 +558,7 @@ gst_cmml_enc_push_clip (GstCmmlEnc * enc, GstCmmlTagClip * clip,
|
|||
GST_BUFFER_TIMESTAMP (buffer) = clip->start_time;
|
||||
|
||||
res = gst_cmml_enc_push (enc, buffer);
|
||||
if (GST_FLOW_IS_FATAL (res))
|
||||
if (res != GST_FLOW_OK)
|
||||
goto done;
|
||||
|
||||
if (clip->end_time != GST_CLOCK_TIME_NONE) {
|
||||
|
@ -586,7 +586,7 @@ gst_cmml_enc_push (GstCmmlEnc * enc, GstBuffer * buffer)
|
|||
GstFlowReturn res;
|
||||
|
||||
res = gst_pad_push (enc->srcpad, buffer);
|
||||
if (GST_FLOW_IS_FATAL (res))
|
||||
if (res != GST_FLOW_OK)
|
||||
GST_WARNING_OBJECT (enc, "push returned: %s", gst_flow_get_name (res));
|
||||
|
||||
return res;
|
||||
|
|
Loading…
Reference in a new issue