Mercurial > libavformat.hg
changeset 4185:023976c45ae1 libavformat
Apply rtpmap: SDP lines to the last m= line only, since they generally just
come directly after each m= line if required. See "[PATCH] RTSP-MS 5-6/15:
parse only the last m= line stream per rtpmap line" thread on ML.
author | rbultje |
---|---|
date | Fri, 09 Jan 2009 23:36:17 +0000 |
parents | bc40129f13cc |
children | 076ba5bc16a4 |
files | rtsp.c |
diffstat | 1 files changed, 2 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/rtsp.c Fri Jan 09 22:13:37 2009 +0000 +++ b/rtsp.c Fri Jan 09 23:36:17 2009 +0000 @@ -441,17 +441,13 @@ } else { av_strlcpy(rtsp_st->control_url, p, sizeof(rtsp_st->control_url)); } - } else if (av_strstart(p, "rtpmap:", &p)) { + } else if (av_strstart(p, "rtpmap:", &p) && s->nb_streams > 0) { /* NOTE: rtpmap is only supported AFTER the 'm=' tag */ get_word(buf1, sizeof(buf1), &p); payload_type = atoi(buf1); - for(i = 0; i < s->nb_streams;i++) { - st = s->streams[i]; + st = s->streams[s->nb_streams - 1]; rtsp_st = st->priv_data; - if (rtsp_st->sdp_payload_type == payload_type) { sdp_parse_rtpmap(st->codec, rtsp_st, payload_type, p); - } - } } else if (av_strstart(p, "fmtp:", &p)) { /* NOTE: fmtp is only supported AFTER the 'a=rtpmap:xxx' tag */ get_word(buf1, sizeof(buf1), &p);