From 79cbdf10ffd34b89f6b4157a7efc3282e4bd5181 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Mon, 3 Jan 2011 23:13:06 +0100 Subject: [PATCH] better... --- cap_lavc.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/cap_lavc.c b/cap_lavc.c index 1aa13c55..14a6babc 100644 --- a/cap_lavc.c +++ b/cap_lavc.c @@ -13,11 +13,11 @@ #include #include -static cvar_t cl_capturevideo_lavc_format = {CVAR_SAVE, "cl_capturevideo_lavc_format", "avi", "video format to use"}; -static cvar_t cl_capturevideo_lavc_vcodec = {CVAR_SAVE, "cl_capturevideo_lavc_vcodec", "mpeg4", "video codec to use"}; -static cvar_t cl_capturevideo_lavc_voptions = {CVAR_SAVE, "cl_capturevideo_lavc_voptions", "qscale=4", "space separated key=value pairs for video encoder flags"}; -static cvar_t cl_capturevideo_lavc_acodec = {CVAR_SAVE, "cl_capturevideo_lavc_acodec", "mp3", "audio codec to use"}; -static cvar_t cl_capturevideo_lavc_aoptions = {CVAR_SAVE, "cl_capturevideo_lavc_aoptions", "b=128000", "space separated key=value pairs for video encoder flags"}; +static cvar_t cl_capturevideo_lavc_format = {CVAR_SAVE, "cl_capturevideo_lavc_format", "mkv", "video format to use"}; +static cvar_t cl_capturevideo_lavc_vcodec = {CVAR_SAVE, "cl_capturevideo_lavc_vcodec", "libvpx", "video codec to use"}; +static cvar_t cl_capturevideo_lavc_voptions = {CVAR_SAVE, "cl_capturevideo_lavc_voptions", "", "space separated key=value pairs for video encoder flags"}; +static cvar_t cl_capturevideo_lavc_acodec = {CVAR_SAVE, "cl_capturevideo_lavc_acodec", "vorbis", "audio codec to use"}; +static cvar_t cl_capturevideo_lavc_aoptions = {CVAR_SAVE, "cl_capturevideo_lavc_aoptions", "", "space separated key=value pairs for video encoder flags"}; qboolean SCR_CaptureVideo_Lavc_OpenLibrary(void) { @@ -253,9 +253,10 @@ static int64_t lavc_seek(void *f, int64_t offset, int whence) // TODO error checking in this function void SCR_CaptureVideo_Lavc_BeginVideo(void) { - const char *fn = va("%s.%s", cls.capturevideo.basename, cls.capturevideo.formatextension); + const char *fn; cls.capturevideo.format = CAPTUREVIDEOFORMAT_LAVC; cls.capturevideo.formatextension = cl_capturevideo_lavc_format.string; + fn = va("%s.%s", cls.capturevideo.basename, cls.capturevideo.formatextension); cls.capturevideo.videofile = FS_OpenRealFile(fn, "wb", false); cls.capturevideo.endvideo = SCR_CaptureVideo_Lavc_EndVideo; cls.capturevideo.videoframes = SCR_CaptureVideo_Lavc_VideoFrames; -- 2.39.2