vorbisenc: detect if new_template is NULL
[platform/upstream/libvorbis.git] / lib / vorbisenc.c
index 193a396..4fc7b62 100644 (file)
@@ -11,7 +11,6 @@
  ********************************************************************
 
  function: simple programmatic interface for encoder mode setup
- last mod: $Id$
 
  ********************************************************************/
 
@@ -1211,7 +1210,7 @@ int vorbis_encode_ctl(vorbis_info *vi,int number,void *arg){
                                           hi->req,
                                           hi->managed,
                                           &new_base);
-        if(!hi->setup)return OV_EIMPL;
+        if(!new_template)return OV_EIMPL;
         hi->setup=new_template;
         hi->base_setting=new_base;
         vorbis_encode_setup_setting(vi,vi->channels,vi->rate);