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 c0b317da94..fcd1d4b487 100644
--- a/video/out/vo_lavc.c
+++ b/video/out/vo_lavc.c
@@ -267,7 +267,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;
}
}