Commit 2880c316 authored by Michael Niedermayer's avatar Michael Niedermayer

parse_packet: use pkt.pos always instead of the avparser offset.

This is more correct and will be needed when the code is moved to
a later point.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 4e7f9ebd
...@@ -1235,7 +1235,7 @@ static int parse_packet(AVFormatContext *s, AVPacket *pkt, int stream_index) ...@@ -1235,7 +1235,7 @@ static int parse_packet(AVFormatContext *s, AVPacket *pkt, int stream_index)
if ((s->iformat->flags & AVFMT_GENERIC_INDEX) && if ((s->iformat->flags & AVFMT_GENERIC_INDEX) &&
out_pkt.flags & AV_PKT_FLAG_KEY) { out_pkt.flags & AV_PKT_FLAG_KEY) {
int64_t pos= (st->parser->flags & PARSER_FLAG_COMPLETE_FRAMES) ? out_pkt.pos : st->parser->frame_offset; int64_t pos= out_pkt.pos;
ff_reduce_index(s, st->index); ff_reduce_index(s, st->index);
av_add_index_entry(st, pos, out_pkt.dts, av_add_index_entry(st, pos, out_pkt.dts,
0, 0, AVINDEX_KEYFRAME); 0, 0, AVINDEX_KEYFRAME);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment