]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtsp.c
Delete unnecessary 'extern' keywords.
[ffmpeg] / libavformat / rtsp.c
index d304d92d0988c4291744e969f1b54fd2a8c9a8ad..33f0e5539e288d4ca247c976bc69557b7c464c47 100644 (file)
@@ -877,7 +877,7 @@ static void rtsp_close_streams(RTSPState *rt)
                 if (rt->transport == RTSP_TRANSPORT_RDT)
                     ff_rdt_parse_close(rtsp_st->tx_ctx);
                 else
-                rtp_parse_close(rtsp_st->tx_ctx);
+                    rtp_parse_close(rtsp_st->tx_ctx);
             }
             if (rtsp_st->rtp_handle)
                 url_close(rtsp_st->rtp_handle);
@@ -901,11 +901,13 @@ rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
         s->ctx_flags |= AVFMTCTX_NOHEADER;
 
     if (rt->transport == RTSP_TRANSPORT_RDT)
-        rtsp_st->tx_ctx = ff_rdt_parse_open(s, st,
+        rtsp_st->tx_ctx = ff_rdt_parse_open(s, st->index,
                                             rtsp_st->dynamic_protocol_context,
                                             rtsp_st->dynamic_handler);
     else
-    rtsp_st->tx_ctx = rtp_parse_open(s, st, rtsp_st->rtp_handle, rtsp_st->sdp_payload_type, &rtsp_st->rtp_payload_data);
+        rtsp_st->tx_ctx = rtp_parse_open(s, st, rtsp_st->rtp_handle,
+                                         rtsp_st->sdp_payload_type,
+                                         &rtsp_st->rtp_payload_data);
 
     if (!rtsp_st->tx_ctx) {
          return AVERROR(ENOMEM);
@@ -1279,7 +1281,7 @@ static int tcp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
     if (ret != len)
         return -1;
     if (rt->transport == RTSP_TRANSPORT_RDT &&
-        ff_rdt_parse_header(buf, len, &id, NULL, NULL, NULL) < 0)
+        ff_rdt_parse_header(buf, len, &id, NULL, NULL, NULL, NULL) < 0)
         return -1;
 
     /* find the matching stream */
@@ -1397,7 +1399,7 @@ static int rtsp_read_packet(AVFormatContext *s,
     case RTSP_LOWER_TRANSPORT_UDP:
     case RTSP_LOWER_TRANSPORT_UDP_MULTICAST:
         len = udp_read_packet(s, &rtsp_st, buf, sizeof(buf));
-        if (len >=0 && rtsp_st->tx_ctx)
+        if (len >=0 && rtsp_st->tx_ctx && rt->transport == RTSP_TRANSPORT_RTP)
             rtp_check_and_send_back_rr(rtsp_st->tx_ctx, len);
         break;
     }