diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-05-26 20:17:12 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-05-26 20:17:12 +0000 |
commit | 2692067a45e4cb4ce0028e170673f2b2f5039721 (patch) | |
tree | 19b10f28c74700113729a7ae6861c734e8bfab01 /libavformat/idroq.c | |
parent | 4aa606ec179a7df514fe5839b7ab5e24b42145b8 (diff) | |
download | ffmpeg-streaming-2692067a45e4cb4ce0028e170673f2b2f5039721.zip ffmpeg-streaming-2692067a45e4cb4ce0028e170673f2b2f5039721.tar.gz |
AVPacket.pos
Originally committed as revision 4314 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/idroq.c')
-rw-r--r-- | libavformat/idroq.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libavformat/idroq.c b/libavformat/idroq.c index 13553ed..add882e 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) |