From 574593b12164fbf44bf7bb2fdaa15b99506c8867 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Fri, 3 Jun 2011 17:22:03 +0200 Subject: [PATCH] sync from encode_lavc_start() --- cap_lavc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cap_lavc.c b/cap_lavc.c index a2bb3963..18aecaf3 100644 --- a/cap_lavc.c +++ b/cap_lavc.c @@ -1123,7 +1123,9 @@ void SCR_CaptureVideo_Lavc_BeginVideo(void) format->bufsize = max(format->bufsize, format->aframesize * sizeof(*format->aframe) * cls.capturevideo.soundchannels * 2 + 200); } - format->avf->pb = qav_alloc_put_byte(format->bytebuffer, sizeof(format->bytebuffer), 1, cls.capturevideo.videofile, NULL, lavc_write, lavc_seek); + if(!(format->avf->flags & AVFMT_NOFILE)) + format->avf->pb = qav_alloc_put_byte(format->bytebuffer, sizeof(format->bytebuffer), 1, cls.capturevideo.videofile, NULL, lavc_write, lavc_seek); + if(qav_write_header(format->avf) < 0) { Con_Printf("Failed to write header\n"); -- 2.39.2