From fe7fb01adb87056a8934e96dc11a3be853ed85da Mon Sep 17 00:00:00 2001 From: tterribe Date: Thu, 28 Aug 2008 18:27:16 +0000 Subject: [PATCH] Set quantization parameters to default values when an empty buffer is passed with TH_ENCCTL_SET_QUANT_PARAMS. git-svn-id: http://svn.xiph.org/trunk@15216 0101bb08-14d6-0310-b084-bc0e0c8e3800 --- theora/lib/enc/encoder_toplevel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/theora/lib/enc/encoder_toplevel.c b/theora/lib/enc/encoder_toplevel.c index 502c84a21..d4777b26c 100644 --- a/theora/lib/enc/encoder_toplevel.c +++ b/theora/lib/enc/encoder_toplevel.c @@ -1374,6 +1374,7 @@ static int theora_encode_control(theora_state *th,int req, return TH_EINVAL; } + if(buf==NULL)buf=&TH_VP31_QUANT_INFO; memcpy(&pbi->quant_info, buf, sizeof(th_quant_info)); InitQTables(pbi); -- 2.11.4.GIT