mirror of
https://github.com/DigitalDevices/dddvb.git
synced 2023-10-10 13:37:43 +02:00
fix output buffer check
We have to leave a 188 byte gap between writer and consumer. So, we need at least 2*188 bytes to be able to write.
This commit is contained in:
parent
4f622ec27c
commit
67e36cdef0
@ -622,12 +622,12 @@ static u32 ddb_output_free(struct ddb_output *output)
|
|||||||
|
|
||||||
if (output->dma->cbuf != idx) {
|
if (output->dma->cbuf != idx) {
|
||||||
if ((((output->dma->cbuf + 1) % output->dma->num) == idx) &&
|
if ((((output->dma->cbuf + 1) % output->dma->num) == idx) &&
|
||||||
(output->dma->size - output->dma->coff <= 188))
|
(output->dma->size - output->dma->coff <= 2*188))
|
||||||
return 0;
|
return 0;
|
||||||
return 188;
|
return 188;
|
||||||
}
|
}
|
||||||
diff = off - output->dma->coff;
|
diff = off - output->dma->coff;
|
||||||
if (diff <= 0 || diff > 188)
|
if (diff <= 0 || diff > 2*188)
|
||||||
return 188;
|
return 188;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user