mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-12 13:30:10 -05:00
rtp: Fix bracketing in pa_rtp_recv.
The syntactically correct error meant that the timestamp was always marked as found and only the first header was checked. In the case where the timestamp was the first header, things would have worked as expected. Thanks to pino for reporting via bug refs #818
This commit is contained in:
parent
d519ca41d7
commit
65f89dca7c
1 changed files with 2 additions and 2 deletions
|
|
@ -278,8 +278,8 @@ int pa_rtp_recv(pa_rtp_context *c, pa_memchunk *chunk, pa_mempool *pool, struct
|
||||||
pa_memchunk_reset(&c->memchunk);
|
pa_memchunk_reset(&c->memchunk);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (cm = CMSG_FIRSTHDR(&m); cm; cm = CMSG_NXTHDR(&m, cm)) {
|
for (cm = CMSG_FIRSTHDR(&m); cm; cm = CMSG_NXTHDR(&m, cm))
|
||||||
if (cm->cmsg_level == SOL_SOCKET && cm->cmsg_type == SO_TIMESTAMP)
|
if (cm->cmsg_level == SOL_SOCKET && cm->cmsg_type == SO_TIMESTAMP) {
|
||||||
memcpy(tstamp, CMSG_DATA(cm), sizeof(struct timeval));
|
memcpy(tstamp, CMSG_DATA(cm), sizeof(struct timeval));
|
||||||
found_tstamp = TRUE;
|
found_tstamp = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue