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

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Jul 24 21:24:20 CEST 2012


On Tue, Jul 24, 2012 at 06:15:35PM +0200, Michael Niedermayer wrote:
> 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;

Maybe extend the AVSTREAM_PARSE_FULL_RAW doxy to say "with packet
timestamp and position generation by parser" or such?


More information about the ffmpeg-devel mailing list