diff options
author | Martin Storsjö <martin@martin.st> | 2012-05-26 00:18:01 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2012-05-26 13:35:39 +0300 |
commit | 2dcb21a95d67c7d1027344abefff57b0fdaa4e33 (patch) | |
tree | 755cc6349d514e63b8ecdf7e4ef41eacdf083b43 /libavformat/rtpenc.c | |
parent | b1d22dc52f678bc137b2bf76135ab6849366c292 (diff) | |
download | ffmpeg-2dcb21a95d67c7d1027344abefff57b0fdaa4e33.tar.gz |
rtpenc: Expose the ssrc as an avoption
This allows the caller to set it, and allows the caller to query
what it was set to.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtpenc.c')
-rw-r--r-- | libavformat/rtpenc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c index 29fc2f4aa7..71eeb7e32f 100644 --- a/libavformat/rtpenc.c +++ b/libavformat/rtpenc.c @@ -33,6 +33,7 @@ static const AVOption options[] = { FF_RTP_FLAG_OPTS(RTPMuxContext, flags) { "payload_type", "Specify RTP payload type", offsetof(RTPMuxContext, payload_type), AV_OPT_TYPE_INT, {.dbl = -1 }, -1, 127, AV_OPT_FLAG_ENCODING_PARAM }, + { "ssrc", "Stream identifier", offsetof(RTPMuxContext, ssrc), AV_OPT_TYPE_INT, { 0 }, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM }, { NULL }, }; @@ -101,7 +102,8 @@ static int rtp_write_header(AVFormatContext *s1) s->base_timestamp = av_get_random_seed(); s->timestamp = s->base_timestamp; s->cur_timestamp = 0; - s->ssrc = av_get_random_seed(); + if (!s->ssrc) + s->ssrc = av_get_random_seed(); s->first_packet = 1; s->first_rtcp_ntp_time = ff_ntp_time(); if (s1->start_time_realtime) |