[FFmpeg-trac] #3223(avformat:new): rtsp regression

FFmpeg trac at avcodec.org
Thu Jan 23 00:37:23 CET 2014


#3223: rtsp regression
-------------------------------------+-------------------------------------
             Reporter:  cehoyos      |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  important    |                Component:  avformat
              Version:  git-master   |               Resolution:
             Keywords:  rtsp rtp     |               Blocked By:
  mp3 regression                     |  Reproduced by developer:  0
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by GstBlub):

 I tracked down what broke it:
 http://git.videolan.org/?p=ffmpeg.git;a=commit;h=c6f1dc8e4cd967ae056698eafb891a08003c211c

 What is happening is that in libavformat/utils.c in read_frame_internal()
 we're checking st->need_parsing, and if this value is non-zero we'll call
 parse_packet.  Prior to this particular change, need_parsing was set in
 libavformat/rtpdec.c in ff_rtp_parse_open().  This change removes this
 code and instead moves it into libavformat/rtpdec_mpeg12.c.  However, the
 code there is never called for this stream, so need_parsing is never
 initialized.  Because this stream has an ID3 header, it then doesn't parse
 the ID3 header and subsequently can't ever find the mpeg header.

 But it isn't actually using that depayer, it's trying to use the x-asf-pf
 depayer specified by the SDP:


 {{{
 Breakpoint 15, ff_rtp_handler_find_by_name (name=0x7fffffff5da0 "x-asf-
 pf", codec_type=AVMEDIA_TYPE_AUDIO) at libavformat/rtpdec.c:102
 102         for (handler = rtp_first_dynamic_payload_handler;
 (gdb) bt
 #0  ff_rtp_handler_find_by_name (name=0x7fffffff5da0 "x-asf-pf",
 codec_type=AVMEDIA_TYPE_AUDIO) at libavformat/rtpdec.c:102
 #1  0x000000000059d497 in sdp_parse_rtpmap (s=0x1a349e0, st=0x1a3a2c0,
 rtsp_st=0x1a39d00, payload_type=96, p=0x7fffffff6192 "/1000")
     at libavformat/rtsp.c:219
 #2  0x000000000059e586 in sdp_parse_line (s=0x1a349e0, s1=0x7fffffff60d0,
 letter=97, buf=0x7fffffff6180 "rtpmap:96 x-asf-pf/1000")
     at libavformat/rtsp.c:492
 #3  0x000000000059ee6e in ff_sdp_parse (s=0x1a349e0,
     content=0x1a381a0 "v=0\r\no=- 201401171205450711 201401171205450711 IN
 IP4 127.0.0.1\r\ns=<No Title>\r\nc=IN IP4
 0.0.0.0\r\nb=AS:258\r\na=maxps:3223\r\nt=0
 0\r\na=control:rtsp://strm01.novotempo.org.br:554/radionovotempo-
 vivo/\r\na=eta"...) at libavformat/rtsp.c:623
 #4  0x00000000005a60e6 in ff_rtsp_setup_input_streams (s=0x1a349e0,
 reply=0x7fffffffc3b0) at libavformat/rtspdec.c:597
 #5  0x00000000005a27e6 in ff_rtsp_connect (s=0x1a349e0) at
 libavformat/rtsp.c:1757
 #6  0x00000000005a6524 in rtsp_read_header (s=0x1a349e0) at
 libavformat/rtspdec.c:690
 #7  0x00000000005cd5ba in avformat_open_input (ps=0x7fffffffdf90,
 filename=0x7fffffffe8af "rtsp://strm01.novotempo.org.br/radionovotempo-
 vivo",
     fmt=0x0, options=0x1a25968) at libavformat/utils.c:544
 #8  0x0000000000407e32 in open_input_file (o=0x7fffffffe0e0,
 filename=0x7fffffffe8af "rtsp://strm01.novotempo.org.br/radionovotempo-
 vivo")
     at ffmpeg_opt.c:801
 #9  0x000000000040f794 in open_files (l=0x1a1e0d8, inout=0xf44f57 "input",
 open_file=0x407769 <open_input_file>) at ffmpeg_opt.c:2506
 #10 0x000000000040f8f8 in ffmpeg_parse_options (argc=6,
 argv=0x7fffffffe628) at ffmpeg_opt.c:2543
 #11 0x0000000000420b3e in main (argc=6, argv=0x7fffffffe628) at
 ffmpeg.c:3433
 }}}

 The x-asf-pf depayloader resolves to ff_ms_rtp_asf_pfa_handler... the
 troubling part is that that structure is declared and registered, but no
 where defined.  A grep ff_ms_rtp_asf_pfa_handler * -R over the entire
 source tree yields only this:


 {{{
 libavformat/rtpdec_formats.h:extern RTPDynamicProtocolHandler
 ff_ms_rtp_asf_pfa_handler;
 libavformat/rtpdec.c:
 ff_register_dynamic_payload_handler(&ff_ms_rtp_asf_pfa_handler);
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/3223#comment:6>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list