diff options
author | Panagiotis Issaris <takis.issaris@uhasselt.be> | 2006-09-20 08:28:24 +0000 |
---|---|---|
committer | Panagiotis Issaris <takis.issaris@uhasselt.be> | 2006-09-20 08:28:24 +0000 |
commit | fcc9b956535ba6bbef37c1a60b1a2d799919c031 (patch) | |
tree | b6047591e68a08027ac46a3f982088d625777674 /libavcodec/opt.c | |
parent | 076ce01793fbf44faecc3374312b60a19ca9856c (diff) | |
download | ffmpeg-fcc9b956535ba6bbef37c1a60b1a2d799919c031.tar.gz |
Inform the user that a certain AVOption is out of range.
Originally committed as revision 6295 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/opt.c')
-rw-r--r-- | libavcodec/opt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/opt.c b/libavcodec/opt.c index 0de7c18621..10528e8ab4 100644 --- a/libavcodec/opt.c +++ b/libavcodec/opt.c @@ -119,8 +119,10 @@ static AVOption *av_set_number(void *obj, const char *name, double num, int den, if(!o || o->offset<=0) return NULL; - if(o->max*den < num*intnum || o->min*den > num*intnum) + if(o->max*den < num*intnum || o->min*den > num*intnum) { + av_log(NULL, AV_LOG_ERROR, "Value %lf for parameter '%s' out of range.\n", num, name); return NULL; + } dst= ((uint8_t*)obj) + o->offset; |