[FFmpeg-devel] [PATCH 3/7] lavf: Set pos for all packets of AVSTREAM_PARSE_FULL_RAW files.

Michael Niedermayer michaelni at gmx.at
Tue Jul 24 18:15:35 CEST 2012


Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 libavformat/utils.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index fba08aa..8a21e94 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1216,6 +1216,9 @@ static int parse_packet(AVFormatContext *s, AVPacket *pkt, int stream_index)
         out_pkt.dts = st->parser->dts;
         out_pkt.pos = st->parser->pos;
 
+        if(st->need_parsing == AVSTREAM_PARSE_FULL_RAW)
+            out_pkt.pos = st->parser->frame_offset;
+
         if (st->parser->key_frame == 1 ||
             (st->parser->key_frame == -1 &&
              st->parser->pict_type == AV_PICTURE_TYPE_I))
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list