[FFmpeg-cvslog] parse_packet: use pkt.pos always instead of the avparser offset.

Michael Niedermayer git at videolan.org
Thu Jul 26 03:10:01 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Jul 26 02:20:59 2012 +0200| [2880c316602bacba1ce5fa2c75890527534b2af3] | committer: 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: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2880c316602bacba1ce5fa2c75890527534b2af3
---

 libavformat/utils.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index fa3b962..d7aba39 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1235,7 +1235,7 @@ static int parse_packet(AVFormatContext *s, AVPacket *pkt, int stream_index)
 
         if ((s->iformat->flags & AVFMT_GENERIC_INDEX) &&
             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);
             av_add_index_entry(st, pos, out_pkt.dts,
                                0, 0, AVINDEX_KEYFRAME);



More information about the ffmpeg-cvslog mailing list