[FFmpeg-devel] [PATCH] fix seeking and index generation
Michael Chinen
mchinen
Mon Aug 23 00:35:17 CEST 2010
On Sat, Aug 14, 2010 at 1:03 AM, Michael Chinen <mchinen at gmail.com> wrote:
> On Fri, Aug 13, 2010 at 10:58 PM, Baptiste Coudurier
> <baptiste.coudurier at gmail.com> wrote:
>> On Sun, Aug 08, 2010 at 09:00:25PM +0200, Michael Chinen wrote:
>>> On Sun, Aug 8, 2010 at 5:40 PM, Michael Chinen <mchinen at gmail.com> wrote:
>>> > Thanks. ?I found a much better way to fix this, but I'm having some
>>> > issues testing, and will submit a new patch tomorrow.
>>>
>>> Here is an updated patch that is less destructive and passes all
>>> regression tests.
>>>
>>> More investigation showed that av_find_stream_info wasn't setting the
>>> start offset correctly for the parser.
>>
>> Can you clarify "start offset" ?
>
> More specifically, AVCodecParserContext.cur_offset and
> next_frame_offset weren't being set to the ftell when the parser
> starts getting input (which is not 0 for formats with headers.) ?As a
> result, the pos for the first indexes started at 0 for generic index
> building.
>
>>
>>
>>> @@ -1148,6 +1154,7 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt)
>>> ? ? ? ? ? ? ?s->cur_st = st;
>>> ? ? ? ? ? ? ?st->cur_ptr = st->cur_pkt.data;
>>> ? ? ? ? ? ? ?st->cur_len = st->cur_pkt.size;
>>> +
>>> ? ? ? ? ? ? ?if (st->need_parsing && !st->parser && !(s->flags & AVFMT_FLAG_NOPARSE)) {
>>> ? ? ? ? ? ? ? ? ?st->parser = av_parser_init(st->codec->codec_id);
>>> ? ? ? ? ? ? ? ? ?if (!st->parser) {
>>
>> Cosmetics must be separated.
>
> Sorry, I missed this. ?Fixed.
Ping.
More information about the ffmpeg-devel
mailing list