[FFmpeg-trac] #1941(avformat:new): unable to receive RTSP stream from VLC

FFmpeg trac at avcodec.org
Thu May 23 13:43:33 EEST 2019


#1941: unable to receive RTSP stream from VLC
------------------------------------+------------------------------------
             Reporter:  rogerdpack  |                    Owner:
                 Type:  defect      |                   Status:  new
             Priority:  normal      |                Component:  avformat
              Version:  git-master  |               Resolution:
             Keywords:  rtsp        |               Blocked By:
             Blocking:              |  Reproduced by developer:  1
Analyzed by developer:  0           |
------------------------------------+------------------------------------

Comment (by tpol):

 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))
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/1941#comment:9>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list