From 2692067a45e4cb4ce0028e170673f2b2f5039721 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 26 May 2005 20:17:12 +0000 Subject: AVPacket.pos Originally committed as revision 4314 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/idroq.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'libavformat/idroq.c') diff --git a/libavformat/idroq.c b/libavformat/idroq.c index 13553ed847..add882eef3 100644 --- a/libavformat/idroq.c +++ b/libavformat/idroq.c @@ -221,13 +221,11 @@ static int roq_read_packet(AVFormatContext *s, url_fseek(pb, codebook_offset, SEEK_SET); /* load up the packet */ - if (av_new_packet(pkt, chunk_size)) + ret= av_get_packet(pb, pkt, chunk_size); + if (ret != chunk_size) return AVERROR_IO; pkt->stream_index = roq->video_stream_index; pkt->pts = roq->video_pts; - ret = get_buffer(pb, pkt->data, chunk_size); - if (ret != chunk_size) - ret = AVERROR_IO; roq->video_pts += roq->frame_pts_inc; packet_read = 1; @@ -254,6 +252,7 @@ static int roq_read_packet(AVFormatContext *s, roq->audio_frame_count += (chunk_size / roq->audio_channels); } + pkt->pos= url_ftell(pb); ret = get_buffer(pb, pkt->data + RoQ_CHUNK_PREAMBLE_SIZE, chunk_size); if (ret != chunk_size) -- cgit v1.2.3