summaryrefslogtreecommitdiff
path: root/libavformat/sdp.c
diff options
context:
space:
mode:
authorLimin Wang <lance.lmwang@gmail.com>2022-01-01 20:19:50 +0800
committerLimin Wang <lance.lmwang@gmail.com>2022-01-12 09:21:07 +0800
commitb697326a68372bec6dc3adece9afaaaebae5028d (patch)
tree50a7ea8c3f2808c646768842c2874df7e7c4e350 /libavformat/sdp.c
parent3ea93bbd6d9687f0171ae632c94b18199b9e62a4 (diff)
avformat/rtpenc_rfc4175: support for interlace format
Below are steps how to test on your local host: wget --no-check-certificate https://samples.ffmpeg.org/MPEG2/interlaced/burosch1.mpg 1. interlace format: ffmpeg -re -i ./burosch1.mpg -c:v bitpacked -pix_fmt yuv422p10 -f rtp rtp://239.255.0.1:6000 copy and create sdp file test.sdp ffplay -buffer_size 671088640 -protocol_whitelist "file,rtp,udp" test.sdp 2. progressive format: ffmpeg -re -i ./burosch1.mpg -vf yadif -c:v bitpacked -pix_fmt yuv422p10 -f rtp rtp://239.255.0.1:6000 copy and create sdp file test.sdp ffplay -buffer_size 671088640 -protocol_whitelist "file,rtp,udp" test.sdp Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Diffstat (limited to 'libavformat/sdp.c')
-rw-r--r--libavformat/sdp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/sdp.c b/libavformat/sdp.c
index 2230d74742..d63a0b34c4 100644
--- a/libavformat/sdp.c
+++ b/libavformat/sdp.c
@@ -728,9 +728,12 @@ static int sdp_write_media_attributes(char *buff, int size, const AVStream *st,
av_strlcatf(buff, size, "a=rtpmap:%d raw/90000\r\n"
"a=fmtp:%d sampling=%s; "
"width=%d; height=%d; "
- "depth=%d\r\n",
+ "depth=%d",
payload_type, payload_type,
pix_fmt, p->width, p->height, bit_depth);
+ if (p->field_order != AV_FIELD_PROGRESSIVE)
+ av_strlcatf(buff, size, "; interlace");
+ av_strlcatf(buff, size, "\r\n");
break;
}