comparison au.c @ 775:c5077fdab490 libavformat

AVPacket.pos
author michael
date Thu, 26 May 2005 20:17:12 +0000
parents d82ccc7cff1c
children feca73904e67
comparison
equal deleted inserted replaced
774:820863425158 775:c5077fdab490
159 { 159 {
160 int ret; 160 int ret;
161 161
162 if (url_feof(&s->pb)) 162 if (url_feof(&s->pb))
163 return AVERROR_IO; 163 return AVERROR_IO;
164 if (av_new_packet(pkt, MAX_SIZE)) 164 ret= av_get_packet(&s->pb, pkt, MAX_SIZE);
165 if (ret < 0)
165 return AVERROR_IO; 166 return AVERROR_IO;
166 pkt->stream_index = 0; 167 pkt->stream_index = 0;
167 168
168 ret = get_buffer(&s->pb, pkt->data, pkt->size);
169 if (ret < 0)
170 av_free_packet(pkt);
171 /* note: we need to modify the packet size here to handle the last 169 /* note: we need to modify the packet size here to handle the last
172 packet */ 170 packet */
173 pkt->size = ret; 171 pkt->size = ret;
174 return 0; 172 return 0;
175 } 173 }