[FFmpeg-devel] [PATCH] vp9_parser: don't overwrite cached timestamps with nopts.

wm4 nfxjfg at googlemail.com
Wed Oct 28 20:44:49 CET 2015


On Wed, 28 Oct 2015 12:21:05 -0400
"Ronald S. Bultje" <rsbultje at gmail.com> wrote:

> ---
>  libavcodec/vp9_parser.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/vp9_parser.c b/libavcodec/vp9_parser.c
> index 0437097..6713850 100644
> --- a/libavcodec/vp9_parser.c
> +++ b/libavcodec/vp9_parser.c
> @@ -64,7 +64,7 @@ static int parse_frame(AVCodecParserContext *ctx, const uint8_t *buf, int size)
>          if (ctx->pts == AV_NOPTS_VALUE)
>              ctx->pts = s->pts;
>          s->pts = AV_NOPTS_VALUE;
> -    } else {
> +    } else if (ctx->pts != AV_NOPTS_VALUE) {
>          s->pts = ctx->pts;
>          ctx->pts = AV_NOPTS_VALUE;
>      }

I find this a bit questionable. What is it needed for? Wouldn't it
repeat the previous timestamp if new packets have none?


More information about the ffmpeg-devel mailing list