mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
Fix usage of C99
It's 2020, way too early for that, let's stick to C89 for now.
This commit is contained in:
parent
b0f4831481
commit
6e1758d509
4 changed files with 18 additions and 8 deletions
|
@ -293,16 +293,18 @@ rtp_twcc_write_status_vector_chunk (ChunkBitWriter * writer, RecvPacket * pkt)
|
|||
if (pkt->missing_run > 0) {
|
||||
guint available = chunk_bit_writer_get_available_slots (writer);
|
||||
guint total = chunk_bit_writer_get_total_slots (writer);
|
||||
guint i;
|
||||
|
||||
if (pkt->missing_run > (available + total)) {
|
||||
/* here it is better to finish up the current status-chunk and then
|
||||
go for run-length */
|
||||
for (guint i = 0; i < available; i++) {
|
||||
for (i = 0; i < available; i++) {
|
||||
chunk_bit_writer_write (writer, RTP_TWCC_PACKET_STATUS_NOT_RECV);
|
||||
}
|
||||
rtp_twcc_write_run_length_chunk (writer->packet_chunks,
|
||||
RTP_TWCC_PACKET_STATUS_NOT_RECV, pkt->missing_run - available);
|
||||
} else {
|
||||
for (guint i = 0; i < pkt->missing_run; i++) {
|
||||
for (i = 0; i < pkt->missing_run; i++) {
|
||||
chunk_bit_writer_write (writer, RTP_TWCC_PACKET_STATUS_NOT_RECV);
|
||||
}
|
||||
}
|
||||
|
@ -696,13 +698,14 @@ _parse_run_length_chunk (GstBitReader * reader, GArray * twcc_packets,
|
|||
{
|
||||
guint run_length;
|
||||
guint8 status_code;
|
||||
guint i;
|
||||
|
||||
gst_bit_reader_get_bits_uint8 (reader, &status_code, 2);
|
||||
|
||||
run_length = *(guint16 *) reader->data & ~0xE0; /* mask out the 3 last bits */
|
||||
run_length = MIN (remaining_packets, GST_READ_UINT16_BE (&run_length));
|
||||
|
||||
for (guint i = 0; i < run_length; i++) {
|
||||
for (i = 0; i < run_length; i++) {
|
||||
_add_twcc_packet (twcc_packets, seqnum_offset + i, status_code);
|
||||
}
|
||||
|
||||
|
@ -715,12 +718,13 @@ _parse_status_vector_chunk (GstBitReader * reader, GArray * twcc_packets,
|
|||
{
|
||||
guint8 symbol_size;
|
||||
guint num_bits;
|
||||
guint i;
|
||||
|
||||
gst_bit_reader_get_bits_uint8 (reader, &symbol_size, 1);
|
||||
symbol_size += 1;
|
||||
num_bits = MIN (remaining_packets, 14 / symbol_size);
|
||||
|
||||
for (guint i = 0; i < num_bits; i++) {
|
||||
for (i = 0; i < num_bits; i++) {
|
||||
guint8 status_code;
|
||||
if (gst_bit_reader_get_bits_uint8 (reader, &status_code, symbol_size))
|
||||
_add_twcc_packet (twcc_packets, seqnum_offset + i, status_code);
|
||||
|
|
|
@ -333,16 +333,18 @@ gst_video_crop_transform_planar (GstVideoCrop * vcrop,
|
|||
{
|
||||
const GstVideoFormatInfo *format_info;
|
||||
gint crop_top, crop_left;
|
||||
guint p;
|
||||
|
||||
format_info = in_frame->info.finfo;
|
||||
crop_left = vcrop->crop_left + x;
|
||||
crop_top = vcrop->crop_top + y;
|
||||
|
||||
for (guint p = 0; p < GST_VIDEO_FRAME_N_PLANES (in_frame); ++p) {
|
||||
for (p = 0; p < GST_VIDEO_FRAME_N_PLANES (in_frame); ++p) {
|
||||
guint8 *plane_in, *plane_out;
|
||||
guint sub_w_factor, sub_h_factor;
|
||||
guint subsampled_crop_left, subsampled_crop_top;
|
||||
guint copy_width;
|
||||
gint i;
|
||||
|
||||
/* plane */
|
||||
plane_in = GST_VIDEO_FRAME_PLANE_DATA (in_frame, p);
|
||||
|
@ -366,7 +368,7 @@ gst_video_crop_transform_planar (GstVideoCrop * vcrop,
|
|||
subsampled_crop_left);
|
||||
copy_width = (guint) GST_VIDEO_FRAME_COMP_WIDTH (out_frame, p);
|
||||
|
||||
for (gint i = 0; i < GST_VIDEO_FRAME_COMP_HEIGHT (out_frame, p); ++i) {
|
||||
for (i = 0; i < GST_VIDEO_FRAME_COMP_HEIGHT (out_frame, p); ++i) {
|
||||
memcpy (plane_out, plane_in, copy_width);
|
||||
plane_in += GST_VIDEO_FRAME_PLANE_STRIDE (in_frame, p);
|
||||
plane_out += GST_VIDEO_FRAME_PLANE_STRIDE (out_frame, p);
|
||||
|
|
|
@ -939,7 +939,9 @@ _pad_added (G_GNUC_UNUSED GstElement * rtpbin, GstPad * pad, GstHarness * h)
|
|||
|
||||
GST_START_TEST (test_quick_shutdown)
|
||||
{
|
||||
for (guint r = 0; r < 1000; r++) {
|
||||
guint r;
|
||||
|
||||
for (r = 0; r < 1000; r++) {
|
||||
guint i;
|
||||
GstHarness *h = gst_harness_new_with_padnames ("rtpbin",
|
||||
"recv_rtp_sink_0", NULL);
|
||||
|
|
|
@ -3568,7 +3568,9 @@ GST_START_TEST (test_twcc_send_and_recv)
|
|||
|
||||
for (frame = 0; frame < num_frames; frame++) {
|
||||
GstBuffer *buf;
|
||||
for (guint slice = 0; slice < num_slices; slice++) {
|
||||
guint slice;
|
||||
|
||||
for (slice = 0; slice < num_slices; slice++) {
|
||||
GstFlowReturn res;
|
||||
guint seq = frame * num_slices + slice;
|
||||
|
||||
|
|
Loading…
Reference in a new issue