Skip to content

Commit 71ce5c3

Browse files
tpoltalih0
tpol
authored andcommitted
avformat/rtsp: correctly set media control uri with mpegts
Fixes #1941 Currently the media control uri is not correctly assigned when mpegts is signalled in the media description. The code checks whether at least one AVStream has been setup before assigning to the media's uri. With mpegts the AVStreams are setup when parsing packets and so the media's uri is skipped. This is fixed by using rt->nb_rtsp_streams in the check which counts all medias in the sdp. Reviewed-by: Andriy Gelman <[email protected]> Signed-off-by: Andriy Gelman <[email protected]>
1 parent 41ddb27 commit 71ce5c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libavformat/rtsp.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
571571
break;
572572
case 'a':
573573
if (av_strstart(p, "control:", &p)) {
574-
if (s->nb_streams == 0) {
574+
if (rt->nb_rtsp_streams == 0) {
575575
if (!strncmp(p, "rtsp://", 7))
576576
av_strlcpy(rt->control_uri, p,
577577
sizeof(rt->control_uri));

0 commit comments

Comments
 (0)