[xiph-commits] r16496 - trunk/theora/lib
tterribe at svn.xiph.org
tterribe at svn.xiph.org
Fri Aug 21 16:41:15 PDT 2009
Author: tterribe
Date: 2009-08-21 16:41:15 -0700 (Fri, 21 Aug 2009)
New Revision: 16496
Modified:
trunk/theora/lib/encode.c
Log:
Prevent the user from setting a keyframe interval of 0.
Modified: trunk/theora/lib/encode.c
===================================================================
--- trunk/theora/lib/encode.c 2009-08-20 23:34:09 UTC (rev 16495)
+++ trunk/theora/lib/encode.c 2009-08-21 23:41:15 UTC (rev 16496)
@@ -1258,6 +1258,7 @@
if(_enc==NULL||_buf==NULL)return TH_EFAULT;
if(_buf_sz!=sizeof(keyframe_frequency_force))return TH_EINVAL;
keyframe_frequency_force=*(ogg_uint32_t *)_buf;
+ if(keyframe_frequency_force<=0)keyframe_frequency_force=1;
if(_enc->packet_state==OC_PACKET_INFO_HDR){
/*It's still early enough to enlarge keyframe_granule_shift.*/
_enc->state.info.keyframe_granule_shift=OC_CLAMPI(
More information about the commits
mailing list