mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 05:06:17 +00:00
flacparse: cleanup on error after state change
https://bugzilla.gnome.org/show_bug.cgi?id=707229
This commit is contained in:
parent
7f59436979
commit
349afc633a
1 changed files with 8 additions and 6 deletions
|
@ -1576,13 +1576,15 @@ gst_flac_parse_parse_frame (GstBaseParse * parse, GstBaseParseFrame * frame,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_last) {
|
if (is_last) {
|
||||||
if ((res = gst_flac_parse_handle_headers (flacparse)) != GST_FLOW_OK)
|
res = gst_flac_parse_handle_headers (flacparse);
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
/* Minimal size of a frame header */
|
/* Minimal size of a frame header */
|
||||||
gst_base_parse_set_min_frame_size (GST_BASE_PARSE (flacparse), MAX (9,
|
gst_base_parse_set_min_frame_size (GST_BASE_PARSE (flacparse), MAX (9,
|
||||||
flacparse->min_framesize));
|
flacparse->min_framesize));
|
||||||
flacparse->state = GST_FLAC_PARSE_STATE_DATA;
|
flacparse->state = GST_FLAC_PARSE_STATE_DATA;
|
||||||
|
|
||||||
|
if (res != GST_FLOW_OK)
|
||||||
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* DROPPED because we pushed already or will push all headers manually */
|
/* DROPPED because we pushed already or will push all headers manually */
|
||||||
|
@ -1615,18 +1617,18 @@ gst_flac_parse_parse_frame (GstBaseParse * parse, GstBaseParseFrame * frame,
|
||||||
GST_WARNING_OBJECT (flacparse,
|
GST_WARNING_OBJECT (flacparse,
|
||||||
"Generating headers for variable blocksize streams not supported");
|
"Generating headers for variable blocksize streams not supported");
|
||||||
|
|
||||||
if ((res = gst_flac_parse_handle_headers (flacparse)) != GST_FLOW_OK)
|
res = gst_flac_parse_handle_headers (flacparse);
|
||||||
goto cleanup;
|
|
||||||
} else {
|
} else {
|
||||||
GST_DEBUG_OBJECT (flacparse, "Generating headers");
|
GST_DEBUG_OBJECT (flacparse, "Generating headers");
|
||||||
|
|
||||||
if (!gst_flac_parse_generate_headers (flacparse))
|
if (!gst_flac_parse_generate_headers (flacparse))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if ((res = gst_flac_parse_handle_headers (flacparse)) != GST_FLOW_OK)
|
res = gst_flac_parse_handle_headers (flacparse);
|
||||||
goto cleanup;
|
|
||||||
}
|
}
|
||||||
flacparse->state = GST_FLAC_PARSE_STATE_DATA;
|
flacparse->state = GST_FLAC_PARSE_STATE_DATA;
|
||||||
|
if (res != GST_FLOW_OK)
|
||||||
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* also cater for oggmux metadata */
|
/* also cater for oggmux metadata */
|
||||||
|
|
Loading…
Reference in a new issue