Mercurial > libavformat.hg
changeset 5368:d93af9bfc0b8 libavformat
Add some "#if"s to avoid compiling the RTSP code when the RTSP demuxer
is disabled, and remove a useless "#if CONFIG_SDP_DEMUXER"
author | lucabe |
---|---|
date | Fri, 13 Nov 2009 10:19:42 +0000 |
parents | f0711d97bff4 |
children | 347123a18feb |
files | rtsp.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/rtsp.c Thu Nov 12 23:05:56 2009 +0000 +++ b/rtsp.c Fri Nov 13 10:19:42 2009 +0000 @@ -43,11 +43,13 @@ //#define DEBUG //#define DEBUG_RTP_TCP +#if CONFIG_RTSP_DEMUXER static int tcp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st, uint8_t *buf, int buf_size); static int rtsp_read_reply(AVFormatContext *s, RTSPMessageHeader *reply, unsigned char **content_ptr, int return_on_interleaved_data); +#endif #if LIBAVFORMAT_VERSION_INT < (53 << 16) int rtsp_default_protocols = (1 << RTSP_LOWER_TRANSPORT_UDP); @@ -599,6 +601,7 @@ } } } +#if CONFIG_RTSP_DEMUXER if (FD_ISSET(tcp_fd, &rfds)) { RTSPMessageHeader reply; @@ -607,6 +610,7 @@ if (rt->state != RTSP_STATE_PLAYING) return 0; } +#endif } } } @@ -731,6 +735,7 @@ return 0; } +#if CONFIG_RTSP_DEMUXER static int rtsp_probe(AVProbeData *p) { if (av_strstart(p->filename, "rtsp:", NULL)) @@ -1714,7 +1719,6 @@ return 0; } -#if CONFIG_RTSP_DEMUXER AVInputFormat rtsp_demuxer = { "rtsp", NULL_IF_CONFIG_SMALL("RTSP input format"), @@ -1801,7 +1805,6 @@ return 0; } -#if CONFIG_SDP_DEMUXER AVInputFormat sdp_demuxer = { "sdp", NULL_IF_CONFIG_SMALL("SDP"), @@ -1811,4 +1814,3 @@ sdp_read_packet, sdp_read_close, }; -#endif