gstjpeg2000parse: no need for else after a goto

else clause is redundant when the end of the if statement is a jump.
If we haven't gone to the beach, we are in the false branch.
This commit is contained in:
Luis de Bethencourt 2016-07-01 14:05:49 +01:00
parent 154698389d
commit 418e643b61

View file

@ -235,11 +235,10 @@ gst_jpeg2000_parse_handle_frame (GstBaseParse * parse,
if (magic_offset == -1) {
*skipsize = gst_byte_reader_get_size (&reader) - num_prefix_bytes;
goto beach;
} else {
}
/* see if we need to skip any bytes at beginning of frame */
GST_DEBUG_OBJECT (jpeg2000parse, "Found magic at offset = %d",
magic_offset);
GST_DEBUG_OBJECT (jpeg2000parse, "Found magic at offset = %d", magic_offset);
if (magic_offset > 0) {
*skipsize = magic_offset;
/* J2C has 8 bytes preceding J2K magic */
@ -250,7 +249,6 @@ gst_jpeg2000_parse_handle_frame (GstBaseParse * parse,
}
if (is_j2c) {
/* sanity check on box id offset */
if (j2c_box_id_offset + GST_JPEG2000_JP2_SIZE_OF_BOX_ID != magic_offset) {
GST_ELEMENT_ERROR (jpeg2000parse, STREAM, DECODE, NULL,
@ -278,7 +276,6 @@ gst_jpeg2000_parse_handle_frame (GstBaseParse * parse,
if ((gst_byte_reader_get_size (&reader) < frame_size))
goto beach;
}
}
/* 2 to skip marker size, and another 2 to skip rsiz field */
if (!gst_byte_reader_skip (&reader, num_prefix_bytes + 2 + 2))