aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/sdp.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2011-05-18 16:21:46 +0300
committerMichael Niedermayer <michaelni@gmx.at>2011-05-20 01:44:10 +0200
commitabe936388940e5d54057c74ba0afc3d228eccdc0 (patch)
treea3b139495bec80aa226eb30250c91b10e4d1c091 /libavformat/sdp.c
parentc78a85adf4a153914233e02b4d44f9414bc579d7 (diff)
downloadffmpeg-abe936388940e5d54057c74ba0afc3d228eccdc0.tar.gz
sdp: Allow passing AVFormatContext flags to the SDP generation
Diffstat (limited to 'libavformat/sdp.c')
-rw-r--r--libavformat/sdp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libavformat/sdp.c b/libavformat/sdp.c
index 923c57fbcd..f7aec1b766 100644
--- a/libavformat/sdp.c
+++ b/libavformat/sdp.c
@@ -299,7 +299,7 @@ xiph_fail:
return NULL;
}
-static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c, int payload_type)
+static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c, int payload_type, int flags)
{
char *config = NULL;
@@ -448,7 +448,7 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c,
return buff;
}
-void ff_sdp_write_media(char *buff, int size, AVCodecContext *c, const char *dest_addr, const char *dest_type, int port, int ttl)
+void ff_sdp_write_media(char *buff, int size, AVCodecContext *c, const char *dest_addr, const char *dest_type, int port, int ttl, int flags)
{
const char *type;
int payload_type;
@@ -471,7 +471,7 @@ void ff_sdp_write_media(char *buff, int size, AVCodecContext *c, const char *des
av_strlcatf(buff, size, "b=AS:%d\r\n", c->bit_rate / 1000);
}
- sdp_write_media_attributes(buff, size, c, payload_type);
+ sdp_write_media_attributes(buff, size, c, payload_type, flags);
}
int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size)
@@ -520,7 +520,8 @@ int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size)
for (j = 0; j < ac[i]->nb_streams; j++) {
ff_sdp_write_media(buf, size,
ac[i]->streams[j]->codec, dst[0] ? dst : NULL,
- dst_type, (port > 0) ? port + j * 2 : 0, ttl);
+ dst_type, (port > 0) ? port + j * 2 : 0, ttl,
+ ac[i]->flags);
if (port <= 0) {
av_strlcatf(buf, size,
"a=control:streamid=%d\r\n", i + j);
@@ -536,7 +537,7 @@ int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size)
return AVERROR(ENOSYS);
}
-void ff_sdp_write_media(char *buff, int size, AVCodecContext *c, const char *dest_addr, const char *dest_type, int port, int ttl)
+void ff_sdp_write_media(char *buff, int size, AVCodecContext *c, const char *dest_addr, const char *dest_type, int port, int ttl, int flags)
{
}
#endif