changeset 3113:f1aecf52bac5 libavformat

Add some information about the stream bitrate, if available
author lucabe
date Wed, 05 Mar 2008 13:31:24 +0000
parents 88e032ac11e7
children 69b7efa1e0cb
files sdp.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/sdp.c	Wed Mar 05 13:06:49 2008 +0000
+++ b/sdp.c	Wed Mar 05 13:31:24 2008 +0000
@@ -267,6 +267,9 @@
 
     av_strlcatf(buff, size, "m=%s %d RTP/AVP %d\r\n", type, port, payload_type);
     dest_write(buff, size, dest_addr, ttl);
+    if (c->bit_rate) {
+        av_strlcatf(buff, size, "b=AS:%d\r\n", c->bit_rate / 1000);
+    }
 
     sdp_media_attributes(buff, size, c, payload_type);
 }