From: Rudolf Polzer Date: Fri, 3 Jun 2011 15:22:03 +0000 (+0200) Subject: sync from encode_lavc_start() X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=574593b12164fbf44bf7bb2fdaa15b99506c8867;p=xonotic%2Fdarkplaces.git sync from encode_lavc_start() --- 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");