pstream: Remove unnecessary if condition

Without split packets, the if condition can now be removed.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
David Henningsson 2015-03-05 14:55:53 +01:00
parent 6a71b5f967
commit a13b6f001d

View file

@ -854,10 +854,8 @@ static int do_read(pa_pstream *p, struct pstream_read *re) {
}
}
} else if (re->index > PA_PSTREAM_DESCRIPTOR_SIZE) {
} else if (re->index >= ntohl(re->descriptor[PA_PSTREAM_DESCRIPTOR_LENGTH]) + PA_PSTREAM_DESCRIPTOR_SIZE) {
/* Frame complete */
if (re->index >= ntohl(re->descriptor[PA_PSTREAM_DESCRIPTOR_LENGTH]) + PA_PSTREAM_DESCRIPTOR_SIZE) {
if (re->memblock) {
memblock_complete(p, re);
@ -920,7 +918,6 @@ static int do_read(pa_pstream *p, struct pstream_read *re) {
goto frame_done;
}
}
return 0;