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/ipmovie.c | |
parent | 4aa606ec179a7df514fe5839b7ab5e24b42145b8 (diff) | |
download | ffmpeg-2692067a45e4cb4ce0028e170673f2b2f5039721.tar.gz |
AVPacket.pos
Originally committed as revision 4314 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/ipmovie.c')
-rw-r--r-- | libavformat/ipmovie.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/libavformat/ipmovie.c b/libavformat/ipmovie.c index fc176fd633..f2f0e9e2c1 100644 --- a/libavformat/ipmovie.c +++ b/libavformat/ipmovie.c @@ -140,16 +140,11 @@ static int load_ipmovie_packet(IPMVEContext *s, ByteIOContext *pb, audio_pts *= s->audio_frame_count; audio_pts /= s->audio_sample_rate; - if (av_new_packet(pkt, s->audio_chunk_size)) - return CHUNK_NOMEM; + if (s->audio_chunk_size != av_get_packet(pb, pkt, s->audio_chunk_size)) + return CHUNK_EOF; pkt->stream_index = s->audio_stream_index; pkt->pts = audio_pts; - if (get_buffer(pb, pkt->data, s->audio_chunk_size) != - s->audio_chunk_size) { - av_free_packet(pkt); - return CHUNK_EOF; - } /* audio frame maintenance */ if (s->audio_type != CODEC_ID_INTERPLAY_DPCM) @@ -171,6 +166,7 @@ static int load_ipmovie_packet(IPMVEContext *s, ByteIOContext *pb, if (av_new_packet(pkt, s->decode_map_chunk_size + s->video_chunk_size)) return CHUNK_NOMEM; + pkt->pos= s->decode_map_chunk_offset; url_fseek(pb, s->decode_map_chunk_offset, SEEK_SET); s->decode_map_chunk_offset = 0; |