rtpdec: fix issue with conversion from unsigned to signed
authorGilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Fri, 20 Feb 2015 06:14:53 +0000 (07:14 +0100)
committerMartin Storsjö <martin@martin.st>
Sat, 21 Feb 2015 21:37:15 +0000 (23:37 +0200)
commit1ec28a66f2c853a7e4aeb21495c0b4d9478f17db
tree46824856cab8af9fc19795ac91c7058b95541bd6
parentff394ca087d41941d2157e7a4e356e3ad312494e
rtpdec: fix issue with conversion from unsigned to signed

When receiving an RTCP packet, the difference between the last RTCP
timestamp and the base timestamp may be negative. As these timestamps
are of the uint32_t type, the result becomes a large integer. Cast
the difference to int32_t to avoid this issue.

The result of this issue is very large start times for RTSP
streams, and difficulty to restart correctly after a pause.

Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtpdec.c