From 0a861b6f8b899a11b5dfe06bd029646d37a564ef Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Thu, 5 Feb 2009 22:34:55 +0000 Subject: Rename "tx_ctx" and "cur_tx" variables to "transport_priv" and "cur_transport_priv", as discussed in the "[PATCH] rtsp.h: rename tx variables" thread. Originally committed as revision 17012 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/rtsp.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'libavformat/rtsp.c') diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index e9be143a67..2d2c3130e8 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -829,11 +829,11 @@ static void rtsp_close_streams(RTSPState *rt) for(i=0;inb_rtsp_streams;i++) { rtsp_st = rt->rtsp_streams[i]; if (rtsp_st) { - if (rtsp_st->tx_ctx) { + if (rtsp_st->transport_priv) { if (rt->transport == RTSP_TRANSPORT_RDT) - ff_rdt_parse_close(rtsp_st->tx_ctx); + ff_rdt_parse_close(rtsp_st->transport_priv); else - rtp_parse_close(rtsp_st->tx_ctx); + rtp_parse_close(rtsp_st->transport_priv); } if (rtsp_st->rtp_handle) url_close(rtsp_st->rtp_handle); @@ -857,19 +857,19 @@ 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->index, + rtsp_st->transport_priv = 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->transport_priv = rtp_parse_open(s, st, rtsp_st->rtp_handle, rtsp_st->sdp_payload_type, &rtsp_st->rtp_payload_data); - if (!rtsp_st->tx_ctx) { + if (!rtsp_st->transport_priv) { return AVERROR(ENOMEM); } else if (rt->transport != RTSP_TRANSPORT_RDT) { if(rtsp_st->dynamic_handler) { - rtp_parse_set_dynamic_protocol(rtsp_st->tx_ctx, + rtp_parse_set_dynamic_protocol(rtsp_st->transport_priv, rtsp_st->dynamic_protocol_context, rtsp_st->dynamic_handler); } @@ -1374,18 +1374,18 @@ static int rtsp_read_packet(AVFormatContext *s, } /* get next frames from the same RTP packet */ - if (rt->cur_tx) { + if (rt->cur_transport_priv) { if (rt->transport == RTSP_TRANSPORT_RDT) - ret = ff_rdt_parse_packet(rt->cur_tx, pkt, NULL, 0); + ret = ff_rdt_parse_packet(rt->cur_transport_priv, pkt, NULL, 0); else - ret = rtp_parse_packet(rt->cur_tx, pkt, NULL, 0); + ret = rtp_parse_packet(rt->cur_transport_priv, pkt, NULL, 0); if (ret == 0) { - rt->cur_tx = NULL; + rt->cur_transport_priv = NULL; return 0; } else if (ret == 1) { return 0; } else { - rt->cur_tx = NULL; + rt->cur_transport_priv = NULL; } } @@ -1399,21 +1399,21 @@ 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 && rt->transport == RTSP_TRANSPORT_RTP) - rtp_check_and_send_back_rr(rtsp_st->tx_ctx, len); + if (len >=0 && rtsp_st->transport_priv && rt->transport == RTSP_TRANSPORT_RTP) + rtp_check_and_send_back_rr(rtsp_st->transport_priv, len); break; } if (len < 0) return len; if (rt->transport == RTSP_TRANSPORT_RDT) - ret = ff_rdt_parse_packet(rtsp_st->tx_ctx, pkt, buf, len); + ret = ff_rdt_parse_packet(rtsp_st->transport_priv, pkt, buf, len); else - ret = rtp_parse_packet(rtsp_st->tx_ctx, pkt, buf, len); + ret = rtp_parse_packet(rtsp_st->transport_priv, pkt, buf, len); if (ret < 0) goto redo; if (ret == 1) { /* more packets may follow, so we save the RTP context */ - rt->cur_tx = rtsp_st->tx_ctx; + rt->cur_transport_priv = rtsp_st->transport_priv; } return 0; } -- cgit v1.2.3