[FFmpeg-soc] [soc]: r4403 - seek_api/mpeg.c

Baptiste Coudurier baptiste.coudurier at gmail.com
Wed Jun 10 20:01:05 CEST 2009


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


More information about the FFmpeg-soc mailing list