aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/avio.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2009-06-04 06:25:53 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2009-06-04 06:25:53 +0000
commit0e848977cedb7345398f583d5cca5e81a4d9e45a (patch)
tree9b64d0a0c45e93d8f3dfbdc2e64b07efa6abe15c /libavformat/avio.c
parent989b7181acbaa5ed3d731dc479a204874fee9141 (diff)
downloadffmpeg-0e848977cedb7345398f583d5cca5e81a4d9e45a.tar.gz
Move function for reading whole specified amount of data from RTSP
demuxer into more common place. Originally committed as revision 19087 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avio.c')
-rw-r--r--libavformat/avio.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libavformat/avio.c b/libavformat/avio.c
index b7d3c23ac8..b6329a927d 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -149,6 +149,20 @@ int url_read(URLContext *h, unsigned char *buf, int size)
return ret;
}
+int url_read_complete(URLContext *h, unsigned char *buf, int size)
+{
+ int ret, len;
+
+ len = 0;
+ while (len < size) {
+ ret = url_read(h, buf+len, size-len);
+ if (ret < 1)
+ return ret;
+ len += ret;
+ }
+ return len;
+}
+
int url_write(URLContext *h, unsigned char *buf, int size)
{
int ret;