Commit edf0c135 authored by Andreas Schmidt's avatar Andreas Schmidt
Browse files

Fix issue with invalid writes.

parent e6c2869c
......@@ -5,14 +5,15 @@
#include <src/util/dbg.h>
#include <src/util/common.h>
#include "block.h"
#include "coding_params.h"
void gather_redundancy_packets(const PrrtBlock *block_ptr, gf *const *fec, int *idx_p)
{
int i;
int m = List_count(block_ptr->dataPackets);
uint32_t m = List_count(block_ptr->dataPackets);
PrrtPacket *packet = NULL;
uint32_t redundancyBlocks = List_count(block_ptr->redundancyPackets);
uint32_t redundancyBlocks = MIN(List_count(block_ptr->redundancyPackets), block_ptr->codingParams.k - m);
for(i = 0; i < redundancyBlocks; i++) {
packet = List_shift(block_ptr->redundancyPackets);
......
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