]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
free more stuff
authorRudolf Polzer <divverent@alientrap.org>
Tue, 4 Jan 2011 07:03:54 +0000 (08:03 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 4 Jan 2011 07:03:54 +0000 (08:03 +0100)
cap_lavc.c

index 347495b44c0291e3fcb2b7bdee2cc6d8d3e609ba..97bfbd304a22873bf3331388cb8d3c8eb5f22496 100644 (file)
@@ -23,8 +23,8 @@ static cvar_t cl_capturevideo_lavc_aoptions = {CVAR_SAVE, "cl_capturevideo_lavc_
 static cvar_t cl_capturevideo_lavc_format = {CVAR_SAVE, "cl_capturevideo_lavc_format", "mp4", "video format to use"};
 static cvar_t cl_capturevideo_lavc_vcodec = {CVAR_SAVE, "cl_capturevideo_lavc_vcodec", "libx264", "video codec to use"};
 static cvar_t cl_capturevideo_lavc_voptions = {CVAR_SAVE, "cl_capturevideo_lavc_voptions",
-       /* sane */     "crf=23 "
-       /* medium */   "coder=1 flags=+loop cmp=+chroma partitions=+parti8x8+parti4x4+partp8x8+partb8x8 me_method=hex subq=7 me_range=16 g=250 keyint_min=25 sc_threshold=40 i_qfactor=0.71 b_strategy=1 qcomp=0.6 qmin=10 qmax=51 qdiff=4 bf=3 refs=3 directpred=1 trellis=1 flags2=+bpyramid+mixed_refs+wpred+dct8x8+fastpskip wpredp=2 "
+       /* sane */     "crf=23 threads=4 "
+       /* faster */   "coder=1 flags=+loop cmp=+chroma partitions=+parti8x8+parti4x4+partp8x8+partb8x8 me_method=hex subq=4 me_range=16 g=250 keyint_min=25 sc_threshold=40 i_qfactor=0.71 b_strategy=1 qcomp=0.6 qmin=10 qmax=51 qdiff=4 bf=3 refs=2 directpred=1 trellis=1 flags2=+bpyramid-mixed_refs+wpred+dct8x8+fastpskip wpredp=1 rc_lookahead=20 "
        /* baseline */ "coder=0 bf=0 flags2=-wpred-dct8x8 wpredp=0",
        "space separated key=value pairs for video encoder flags"};
 static cvar_t cl_capturevideo_lavc_acodec = {CVAR_SAVE, "cl_capturevideo_lavc_acodec", "aac", "audio codec to use"};
@@ -88,10 +88,13 @@ static void SCR_CaptureVideo_Lavc_EndVideo(void)
                                av_free(format->avf->streams[i]->info);
                                av_free(format->avf->streams[i]);
                        }
+                       av_free(format->avf->pb);
                        av_free(format->avf);
-                       format->avf = NULL;
                }
+               Mem_Free(format->buffer);
        }
+       if(format->aframe)
+               Mem_Free(format->aframe);
        Mem_Free(format);
 
        FS_Close(cls.capturevideo.videofile);