vp9_parser: don't overwrite cached timestamps with nopts.
authorRonald S. Bultje <rsbultje@gmail.com>
Wed, 28 Oct 2015 16:20:25 +0000 (12:20 -0400)
committerRonald S. Bultje <rsbultje@gmail.com>
Thu, 29 Oct 2015 02:15:36 +0000 (22:15 -0400)
libavcodec/vp9_parser.c

index 0437097..6713850 100644 (file)
@@ -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;
     }