avio: add avio_tell macro as a replacement for url_ftell

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
This commit is contained in:
Anton Khirnov
2011-03-03 20:11:45 +01:00
committed by Ronald S. Bultje
parent e16ead0716
commit a2704c9712
87 changed files with 392 additions and 391 deletions

View File

@@ -87,7 +87,7 @@ static av_cold int iss_read_header(AVFormatContext *s, AVFormatParameters *ap)
get_token(pb, token, sizeof(token)); //Version ID
get_token(pb, token, sizeof(token)); //Size
iss->sample_start_pos = url_ftell(pb);
iss->sample_start_pos = avio_tell(pb);
st = av_new_stream(s, 0);
if (!st)
@@ -116,7 +116,7 @@ static int iss_read_packet(AVFormatContext *s, AVPacket *pkt)
return AVERROR(EIO);
pkt->stream_index = 0;
pkt->pts = url_ftell(s->pb) - iss->sample_start_pos;
pkt->pts = avio_tell(s->pb) - iss->sample_start_pos;
if(s->streams[0]->codec->channels > 0)
pkt->pts /= s->streams[0]->codec->channels*2;
return 0;