Mercurial > libavcodec.hg
comparison opt.c @ 6799:2854b51e7f47 libavcodec
Make av_set_string() fail when number could not be set.
Patch by Stefano Sabatini stefano¡øsabatini-lalaATposte¡øit
author | benoit |
---|---|
date | Thu, 15 May 2008 01:03:48 +0000 |
parents | 51bbc2f553e2 |
children | 80ebdc755fa9 |
comparison
equal
deleted
inserted
replaced
6798:b87b1aba5d89 | 6799:2854b51e7f47 |
---|---|
180 if (cmd=='+') d= av_get_int(obj, name, NULL) | (int64_t)d; | 180 if (cmd=='+') d= av_get_int(obj, name, NULL) | (int64_t)d; |
181 else if(cmd=='-') d= av_get_int(obj, name, NULL) &~(int64_t)d; | 181 else if(cmd=='-') d= av_get_int(obj, name, NULL) &~(int64_t)d; |
182 }else if(cmd=='-') | 182 }else if(cmd=='-') |
183 d= -d; | 183 d= -d; |
184 | 184 |
185 av_set_number(obj, name, d, 1, 1); | 185 if (!av_set_number(obj, name, d, 1, 1)) |
186 return NULL; | |
186 val+= i; | 187 val+= i; |
187 if(!*val) | 188 if(!*val) |
188 return o; | 189 return o; |
189 } | 190 } |
190 return NULL; | 191 return NULL; |