Commit 4ccc2f79 authored by Rafaël Carré's avatar Rafaël Carré

flac packetizer: deindent switch

parent a799a89f
......@@ -436,11 +436,9 @@ static block_t *Packetize(decoder_t *p_dec, block_t **pp_block)
block_BytestreamPush(&p_sys->bytestream, in);
while (1) {
switch (p_sys->i_state) {
while (1) switch (p_sys->i_state) {
case STATE_NOSYNC:
while (block_PeekBytes(&p_sys->bytestream, p_header, 2)
== VLC_SUCCESS) {
while (!block_PeekBytes(&p_sys->bytestream, p_header, 2)) {
if (p_header[0] == 0xFF && (p_header[1] & 0xFE) == 0xF8) {
p_sys->i_state = STATE_SYNC;
break;
......@@ -462,8 +460,7 @@ static block_t *Packetize(decoder_t *p_dec, block_t **pp_block)
case STATE_HEADER:
/* Get FLAC frame header (MAX_FLAC_HEADER_SIZE bytes) */
if (block_PeekBytes(&p_sys->bytestream, p_header,
MAX_FLAC_HEADER_SIZE) != VLC_SUCCESS)
if (block_PeekBytes(&p_sys->bytestream, p_header, MAX_FLAC_HEADER_SIZE))
return NULL; /* Need more data */
/* Check if frame is valid and get frame info */
......@@ -492,10 +489,8 @@ static block_t *Packetize(decoder_t *p_dec, block_t **pp_block)
* next sync word */
/* Check if next expected frame contains the sync word */
while (block_PeekOffsetBytes(&p_sys->bytestream,
p_sys->i_frame_size, p_header,
MAX_FLAC_HEADER_SIZE)
== VLC_SUCCESS) {
while (!block_PeekOffsetBytes(&p_sys->bytestream, p_sys->i_frame_size,
p_header, MAX_FLAC_HEADER_SIZE)) {
if (p_header[0] == 0xFF && (p_header[1] & 0xFE) == 0xF8) {
/* Check if frame is valid and get frame info */
int i_frame_length =
......@@ -554,7 +549,6 @@ static block_t *Packetize(decoder_t *p_dec, block_t **pp_block)
return out;
}
}
return NULL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment