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/4xm.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/4xm.c')
-rw-r--r-- | libavformat/4xm.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libavformat/4xm.c b/libavformat/4xm.c index 5ce1f43f5e..7c0f78e6b9 100644 --- a/libavformat/4xm.c +++ b/libavformat/4xm.c @@ -277,6 +277,7 @@ static int fourxm_read_packet(AVFormatContext *s, return AVERROR_IO; pkt->stream_index = fourxm->video_stream_index; pkt->pts = fourxm->video_pts; + pkt->pos = url_ftell(&s->pb); memcpy(pkt->data, header, 8); ret = get_buffer(&s->pb, &pkt->data[8], size); @@ -293,16 +294,13 @@ static int fourxm_read_packet(AVFormatContext *s, size-=8; if (track_number == fourxm->selected_track) { - if (av_new_packet(pkt, size)) + ret= av_get_packet(&s->pb, pkt, size); + if(ret<0) return AVERROR_IO; pkt->stream_index = fourxm->tracks[fourxm->selected_track].stream_index; pkt->pts = fourxm->audio_pts; - ret = get_buffer(&s->pb, pkt->data, size); - if (ret < 0) - av_free_packet(pkt); - else - packet_read = 1; + packet_read = 1; /* pts accounting */ audio_frame_count = size; |