On 6/10/2009 10:40 AM, spyfeng wrote: > Author: spyfeng > Date: Wed Jun 10 19:40:15 2009 > New Revision: 4403 > > Log: > set pkt->pos value when reading packet > > Modified: > seek_api/mpeg.c > > Modified: seek_api/mpeg.c > ============================================================================== > --- seek_api/mpeg.c Tue Jun 9 20:37:10 2009 (r4402) > +++ seek_api/mpeg.c Wed Jun 10 19:40:15 2009 (r4403) > @@ -541,6 +541,7 @@ static int mpegps_read_packet(AVFormatCo > return AVERROR(EINVAL); > } > av_new_packet(pkt, len); > + pkt->pos = url_ftell(s->pb); > get_buffer(s->pb, pkt->data, pkt->size); > pkt->pts = pts; > pkt->dts = dts;
pkt->pos must be set to the start of the PES packet, like it was by the old av_add_index_entry. Seeking here will not work. -- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA FFmpeg maintainer http://www.ffmpeg.org _______________________________________________ FFmpeg-soc mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc
