summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_qt.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-03-03 20:11:45 +0100
committerRonald S. Bultje <rsbultje@gmail.com>2011-03-04 11:26:57 -0500
commita2704c9712ad35cc22e7e0d8a79b581c07fa383b (patch)
treeebf5a27a98dbd52d983e38e901661f7525b38e9a /libavformat/rtpdec_qt.c
parente16ead0716c2f988d1e26369a4c67b354ff86134 (diff)
avio: add avio_tell macro as a replacement for url_ftell
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavformat/rtpdec_qt.c')
-rw-r--r--libavformat/rtpdec_qt.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libavformat/rtpdec_qt.c b/libavformat/rtpdec_qt.c
index 5cf5223c84..4041a0fca5 100644
--- a/libavformat/rtpdec_qt.c
+++ b/libavformat/rtpdec_qt.c
@@ -115,10 +115,10 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt,
if (pos + data_len > len)
return AVERROR_INVALIDDATA;
/* TLVs */
- while (url_ftell(&pb) + 4 < pos + data_len) {
+ while (avio_tell(&pb) + 4 < pos + data_len) {
int tlv_len = avio_rb16(&pb);
tag = avio_rl16(&pb);
- if (url_ftell(&pb) + tlv_len > pos + data_len)
+ if (avio_tell(&pb) + tlv_len > pos + data_len)
return AVERROR_INVALIDDATA;
#define MKTAG16(a,b) MKTAG(a,b,0,0)
@@ -155,7 +155,7 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt,
}
/* 32-bit alignment */
- avio_seek(&pb, ((url_ftell(&pb) + 3) & ~3) - url_ftell(&pb), SEEK_CUR);
+ avio_seek(&pb, ((avio_tell(&pb) + 3) & ~3) - avio_tell(&pb), SEEK_CUR);
} else
avio_seek(&pb, 4, SEEK_SET);
@@ -164,7 +164,7 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt,
return AVERROR_NOTSUPP;
}
- alen = len - url_ftell(&pb);
+ alen = len - avio_tell(&pb);
if (alen <= 0)
return AVERROR_INVALIDDATA;
@@ -182,7 +182,7 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt,
}
if (!qt->pkt.data)
return AVERROR(ENOMEM);
- memcpy(qt->pkt.data + qt->pkt.size, buf + url_ftell(&pb), alen);
+ memcpy(qt->pkt.data + qt->pkt.size, buf + avio_tell(&pb), alen);
qt->pkt.size += alen;
if (has_marker_bit) {
*pkt = qt->pkt;
@@ -203,7 +203,7 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt,
qt->remaining = (alen / qt->bytes_per_frame) - 1;
if (av_new_packet(pkt, qt->bytes_per_frame))
return AVERROR(ENOMEM);
- memcpy(pkt->data, buf + url_ftell(&pb), qt->bytes_per_frame);
+ memcpy(pkt->data, buf + avio_tell(&pb), qt->bytes_per_frame);
pkt->flags = flags & RTP_FLAG_KEY ? AV_PKT_FLAG_KEY : 0;
pkt->stream_index = st->index;
if (qt->remaining > 0) {
@@ -215,7 +215,7 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt,
}
qt->pkt.size = qt->remaining * qt->bytes_per_frame;
memcpy(qt->pkt.data,
- buf + url_ftell(&pb) + qt->bytes_per_frame,
+ buf + avio_tell(&pb) + qt->bytes_per_frame,
qt->remaining * qt->bytes_per_frame);
qt->pkt.flags = pkt->flags;
return 1;