]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
sync from encode_lavc_start()
authorRudolf Polzer <divverent@xonotic.org>
Fri, 3 Jun 2011 15:22:03 +0000 (17:22 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Fri, 3 Jun 2011 15:22:03 +0000 (17:22 +0200)
cap_lavc.c

index a2bb3963f2512f0c9457768e0a932a35e672a2a3..18aecaf379297a3879a061ec576afed293303c66 100644 (file)
@@ -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");