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 | |
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')
-rw-r--r-- | libavformat/rtpenc.c | 4 | ||||
-rw-r--r-- | libavformat/version.h | 2 |
2 files changed, 4 insertions, 2 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) diff --git a/libavformat/version.h b/libavformat/version.h index 7bd0b8e5f5..b00701eefa 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -31,7 +31,7 @@ #define LIBAVFORMAT_VERSION_MAJOR 54 #define LIBAVFORMAT_VERSION_MINOR 3 -#define LIBAVFORMAT_VERSION_MICRO 0 +#define LIBAVFORMAT_VERSION_MICRO 1 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ LIBAVFORMAT_VERSION_MINOR, \ |