mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 07:28:53 +00:00
flacparse: drop superflous else clauses
This commit is contained in:
parent
7286aae6e5
commit
a086ee6192
1 changed files with 26 additions and 28 deletions
|
@ -813,27 +813,26 @@ gst_flac_parse_handle_frame (GstBaseParse * parse,
|
||||||
if (ret) {
|
if (ret) {
|
||||||
framesize = next;
|
framesize = next;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
} else {
|
}
|
||||||
/* If we're at EOS and the frame was not valid, drop it! */
|
/* If we're at EOS and the frame was not valid, drop it! */
|
||||||
if (G_UNLIKELY (GST_BASE_PARSE_DRAINING (flacparse))) {
|
if (G_UNLIKELY (GST_BASE_PARSE_DRAINING (flacparse))) {
|
||||||
GST_WARNING_OBJECT (flacparse, "EOS");
|
GST_WARNING_OBJECT (flacparse, "EOS");
|
||||||
result = FALSE;
|
result = FALSE;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (next == 0) {
|
if (next == 0) {
|
||||||
} else if (next > map.size) {
|
} else if (next > map.size) {
|
||||||
GST_DEBUG_OBJECT (flacparse, "Requesting %u bytes", next);
|
GST_DEBUG_OBJECT (flacparse, "Requesting %u bytes", next);
|
||||||
*skipsize = 0;
|
*skipsize = 0;
|
||||||
gst_base_parse_set_min_frame_size (parse, next);
|
gst_base_parse_set_min_frame_size (parse, next);
|
||||||
result = FALSE;
|
result = FALSE;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
} else {
|
} else {
|
||||||
GST_ERROR_OBJECT (flacparse,
|
GST_ERROR_OBJECT (flacparse,
|
||||||
"Giving up on invalid frame (%" G_GSIZE_FORMAT " bytes)", map.size);
|
"Giving up on invalid frame (%" G_GSIZE_FORMAT " bytes)", map.size);
|
||||||
result = FALSE;
|
result = FALSE;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
GstByteReader reader;
|
GstByteReader reader;
|
||||||
|
@ -849,12 +848,12 @@ gst_flac_parse_handle_frame (GstBaseParse * parse,
|
||||||
*skipsize = off;
|
*skipsize = off;
|
||||||
result = FALSE;
|
result = FALSE;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
} else {
|
|
||||||
GST_DEBUG_OBJECT (flacparse, "Sync code not found");
|
|
||||||
*skipsize = map.size - 3;
|
|
||||||
result = FALSE;
|
|
||||||
goto cleanup;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GST_DEBUG_OBJECT (flacparse, "Sync code not found");
|
||||||
|
*skipsize = map.size - 3;
|
||||||
|
result = FALSE;
|
||||||
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = FALSE;
|
result = FALSE;
|
||||||
|
@ -1708,10 +1707,9 @@ gst_flac_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
|
||||||
if (GST_PAD_IS_FLUSHING (GST_BASE_PARSE_SRC_PAD (parse))) {
|
if (GST_PAD_IS_FLUSHING (GST_BASE_PARSE_SRC_PAD (parse))) {
|
||||||
GST_INFO_OBJECT (parse, "Src pad is flushing");
|
GST_INFO_OBJECT (parse, "Src pad is flushing");
|
||||||
return GST_FLOW_FLUSHING;
|
return GST_FLOW_FLUSHING;
|
||||||
} else {
|
|
||||||
GST_INFO_OBJECT (parse, "Src pad is not negotiated!");
|
|
||||||
return GST_FLOW_NOT_NEGOTIATED;
|
|
||||||
}
|
}
|
||||||
|
GST_INFO_OBJECT (parse, "Src pad is not negotiated!");
|
||||||
|
return GST_FLOW_NOT_NEGOTIATED;
|
||||||
}
|
}
|
||||||
gst_pb_utils_add_codec_description_to_tag_list (flacparse->tags,
|
gst_pb_utils_add_codec_description_to_tag_list (flacparse->tags,
|
||||||
GST_TAG_AUDIO_CODEC, caps);
|
GST_TAG_AUDIO_CODEC, caps);
|
||||||
|
|
Loading…
Reference in a new issue