summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/out/vo_lavc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/vo_lavc.c b/video/out/vo_lavc.c
index 84f09a161f..9617e0f989 100644
--- a/video/out/vo_lavc.c
+++ b/video/out/vo_lavc.c
@@ -273,7 +273,8 @@ static int encode_video(struct vo *vo, AVFrame *frame, AVPacket *packet)
frame->pts * (double) vc->stream->codec->time_base.num /
(double) vc->stream->codec->time_base.den, size);
- encode_lavc_write_stats(vo->encode_lavc_ctx, vc->stream);
+ if (got_packet)
+ encode_lavc_write_stats(vo->encode_lavc_ctx, vc->stream);
return size;
}
}