mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-24 08:12:44 +00:00
seeking: Favor pkt->pos for generic index building where possible.
See [FFmpeg-devel] [PATCH] Only using st->parser->pos when doing?repacking in the parser. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
ca87d43906
commit
67d441499a
@ -1102,8 +1102,9 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt)
|
||||
compute_pkt_fields(s, st, st->parser, pkt);
|
||||
|
||||
if((s->iformat->flags & AVFMT_GENERIC_INDEX) && pkt->flags & AV_PKT_FLAG_KEY){
|
||||
int64_t pos= (st->parser->flags & PARSER_FLAG_COMPLETE_FRAMES) ? pkt->pos : st->parser->frame_offset;
|
||||
ff_reduce_index(s, st->index);
|
||||
av_add_index_entry(st, st->parser->frame_offset, pkt->dts,
|
||||
av_add_index_entry(st, pos, pkt->dts,
|
||||
0, 0, AVINDEX_KEYFRAME);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user