Default streamid is some numeric value and not used by SRT code. Instead SRT has its own string streamid. Current code has the same option name for both and this causes a conflict when ffmpeg is started from a terminal.
The attached patch fixes it by renaming SRT's "streamid" to "srt_streamid" Best Regards, Sergey
From 46d75e066ec828545ebf242ab0530ecb66d7fc6d Mon Sep 17 00:00:00 2001 From: Sergey Ilinykh <rion...@gmail.com> Date: Thu, 3 Jun 2021 13:13:32 +0300 Subject: [PATCH] Rename SRT's streamid to srt_streamid to avoid a conflict with standard streamid option --- libavformat/libsrt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c index c1e96f700e..10dfc9e9c9 100644 --- a/libavformat/libsrt.c +++ b/libavformat/libsrt.c @@ -133,7 +133,7 @@ static const AVOption libsrt_options[] = { { "rcvbuf", "Receive buffer size (in bytes)", OFFSET(rcvbuf), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, .flags = D|E }, { "lossmaxttl", "Maximum possible packet reorder tolerance", OFFSET(lossmaxttl), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, .flags = D|E }, { "minversion", "The minimum SRT version that is required from the peer", OFFSET(minversion), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, .flags = D|E }, - { "streamid", "A string of up to 512 characters that an Initiator can pass to a Responder", OFFSET(streamid), AV_OPT_TYPE_STRING, { .str = NULL }, .flags = D|E }, + { "srt_streamid", "A string of up to 512 characters that an Initiator can pass to a Responder", OFFSET(streamid), AV_OPT_TYPE_STRING, { .str = NULL }, .flags = D|E }, { "smoother", "The type of Smoother used for the transmission for that socket", OFFSET(smoother), AV_OPT_TYPE_STRING, { .str = NULL }, .flags = D|E }, { "messageapi", "Enable message API", OFFSET(messageapi), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, .flags = D|E }, { "transtype", "The transmission type for the socket", OFFSET(transtype), AV_OPT_TYPE_INT, { .i64 = SRTT_INVALID }, SRTT_LIVE, SRTT_INVALID, .flags = D|E, "transtype" }, @@ -608,7 +608,7 @@ static int libsrt_open(URLContext *h, const char *uri, int flags) if (av_find_info_tag(buf, sizeof(buf), "minversion", p)) { s->minversion = strtol(buf, NULL, 0); } - if (av_find_info_tag(buf, sizeof(buf), "streamid", p)) { + if (av_find_info_tag(buf, sizeof(buf), "srt_streamid", p)) { av_freep(&s->streamid); s->streamid = av_strdup(buf); if (!s->streamid) { -- 2.31.1
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".