]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/opt.c
X8 is supported now, so warning is incorrect
[ffmpeg] / libavcodec / opt.c
index ed7aaa0f86f410f516718adcff73cad6c4db9ddf..deddfd1cd9a8f7beca4ba05ae8095561a581b90b 100644 (file)
@@ -17,7 +17,6 @@
  * You should have received a copy of the GNU Lesser General Public
  * License along with FFmpeg; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
  */
 
 /**
@@ -36,7 +35,7 @@ const AVOption *av_find_opt(void *v, const char *name, const char *unit, int mas
     const AVOption *o= c->option;
 
     for(;o && o->name; o++){
-        if(!strcmp(o->name, name) && (!unit || !strcmp(o->unit, unit)) && (o->flags & mask) == flags )
+        if(!strcmp(o->name, name) && (!unit || (o->unit && !strcmp(o->unit, unit))) && (o->flags & mask) == flags )
             return o;
     }
     return NULL;
@@ -139,6 +138,8 @@ const AVOption *av_set_string(void *obj, const char *name, const char *val){
                 else if(!strcmp(buf, "default")) d= o->default_val;
                 else if(!strcmp(buf, "max"    )) d= o->max;
                 else if(!strcmp(buf, "min"    )) d= o->min;
+                else if(!strcmp(buf, "none"   )) d= 0;
+                else if(!strcmp(buf, "all"    )) d= ~0;
                 else {
                     if (!error)
                         av_log(NULL, AV_LOG_ERROR, "Unable to parse option value \"%s\": %s\n", val, error);