summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2009-03-03 17:04:51 +0000
committerRonald S. Bultje <rsbultje@gmail.com>2009-03-03 17:04:51 +0000
commitf0a80394645ce436307d3d458878689411a44ba7 (patch)
tree78da33e8ec44b8767300dcf5fca4b3e6213fbdd4 /libavformat/rtsp.c
parent2fea965070a96a04a46513cc524ac4cfcf622fd8 (diff)
Add url_get_file_handle(), which is used to get the file descriptor
associated with the I/O handle (e.g. the fd returned by open()). See "[RFC] rtsp.c EOF support" thread. There were previously some URI-specific implementations of the same idea, e.g. rtp_get_file_handles() and udp_get_file_handle(). All of these are deprecated by this patch and will be removed at the next major API bump. Originally committed as revision 17779 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 7c9242d01f..578ee2413f 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1305,7 +1305,7 @@ static int udp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
RTSPState *rt = s->priv_data;
RTSPStream *rtsp_st;
fd_set rfds;
- int fd1, fd2, fd_max, n, i, ret;
+ int fd1, fd_max, n, i, ret;
struct timeval tv;
for(;;) {
@@ -1318,7 +1318,7 @@ static int udp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
if (rtsp_st->rtp_handle) {
/* currently, we cannot probe RTCP handle because of
* blocking restrictions */
- rtp_get_file_handles(rtsp_st->rtp_handle, &fd1, &fd2);
+ fd1 = url_get_file_handle(rtsp_st->rtp_handle);
if (fd1 > fd_max)
fd_max = fd1;
FD_SET(fd1, &rfds);
@@ -1331,7 +1331,7 @@ static int udp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
for(i = 0; i < rt->nb_rtsp_streams; i++) {
rtsp_st = rt->rtsp_streams[i];
if (rtsp_st->rtp_handle) {
- rtp_get_file_handles(rtsp_st->rtp_handle, &fd1, &fd2);
+ fd1 = url_get_file_handle(rtsp_st->rtp_handle);
if (FD_ISSET(fd1, &rfds)) {
ret = url_read(rtsp_st->rtp_handle, buf, buf_size);
if (ret > 0) {