Commit 9774251c authored by Michael Niedermayer's avatar Michael Niedermayer

rtpenc: do not use random values for seq when bitexact is requested.

Fixes fate
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 73b59cc1
......@@ -128,9 +128,12 @@ static int rtp_write_header(AVFormatContext *s1)
// Pick a random sequence start number, but in the lower end of the
// available range, so that any wraparound doesn't happen immediately.
// (Immediate wraparound would be an issue for SRTP.)
if (s->seq < 0)
if (s->seq < 0) {
if (st->codec->flags & CODEC_FLAG_BITEXACT) {
s->seq = 0;
} else
s->seq = av_get_random_seed() & 0x0fff;
else
} else
s->seq &= 0xffff; // Use the given parameter, wrapped to the right interval
if (s1->packet_size) {
......
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