Created
October 1, 2019 14:38
-
-
Save daleffe/527afd68753f1e066b894a3d642de385 to your computer and use it in GitHub Desktop.
FFMPEG failed to load stream from RTSP VLC Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://trac.ffmpeg.org/ticket/1941 | |
It looks like FFmpeg incorrectly parses the SDP information in case of MPEG-2 transport stream. | |
When payload type is 33, it uses the Session control url instead of the Media control url in RTSP SETUP request. | |
a=control:rtsp://..:8554/ | |
vs | |
a=control:rtsp://..:8554/trackID=0 | |
I was able to receive the stream with the following fix: | |
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c | |
index c153cac..b8c7128 100644 | |
--- a/libavformat/rtsp.c | |
+++ b/libavformat/rtsp.c | |
@@ -541,7 +541,7 @@ | |
break; | |
case 'a': | |
if (av_strstart(p, "control:", &p)) { | |
- if (s->nb_streams == 0) { | |
+ if (rt->nb_rtsp_streams == 0) { | |
if (!strncmp(p, "rtsp://", 7)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment