rtpdec_jpeg: Fold the default qtables case into an existing if statement
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
a218deb856
commit
1de9317bd0
@ -303,6 +303,10 @@ static int jpeg_parse_packet(AVFormatContext *ctx, PayloadContext *jpeg,
|
|||||||
qtables = &jpeg->qtables[q - 128][0];
|
qtables = &jpeg->qtables[q - 128][0];
|
||||||
qtable_len = jpeg->qtables_len[q - 128];
|
qtable_len = jpeg->qtables_len[q - 128];
|
||||||
}
|
}
|
||||||
|
} else { /* q <= 127 */
|
||||||
|
create_default_qtables(new_qtables, q);
|
||||||
|
qtables = new_qtables;
|
||||||
|
qtable_len = sizeof(new_qtables);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Skip the current frame in case of the end packet
|
/* Skip the current frame in case of the end packet
|
||||||
@ -313,12 +317,6 @@ static int jpeg_parse_packet(AVFormatContext *ctx, PayloadContext *jpeg,
|
|||||||
return ret;
|
return ret;
|
||||||
jpeg->timestamp = *timestamp;
|
jpeg->timestamp = *timestamp;
|
||||||
|
|
||||||
if (!qtables) {
|
|
||||||
create_default_qtables(new_qtables, q);
|
|
||||||
qtables = new_qtables;
|
|
||||||
qtable_len = sizeof(new_qtables);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Generate a frame and scan headers that can be prepended to the
|
/* Generate a frame and scan headers that can be prepended to the
|
||||||
* RTP/JPEG data payload to produce a JPEG compressed image in
|
* RTP/JPEG data payload to produce a JPEG compressed image in
|
||||||
* interchange format. */
|
* interchange format. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user