History

Make av_parse_color() return AVERROR(EINVAL) rather than -1.

Originally committed as revision 23120 to svn://svn.ffmpeg.org/ffmpeg/trunk

Stefano Sabatini committed 16 years ago

Commit dc0eaef1 parent 40914d91 file · +2 −2Browse files

Unified · Split

libavfilter/parseutils.c+2−2
@@ -231,7 +231,7 @@ int av_parse_color(uint8_t *rgba_color, const char *color_string, void *log_ctx) · 230 unmodified lines
231231
232232 if (*tail || (len != 8 && len != 10)) {
233233 av_log(log_ctx, AV_LOG_ERROR, "Invalid 0xRRGGBB[AA] color string: '%s'\n", color_string);
234− return -1;
234+ return AVERROR(EINVAL);
235235 }
236236 if (len == 10) {
237237 rgba_color[3] = rgba;
@@ -248,7 +248,7 @@ int av_parse_color(uint8_t *rgba_color, const char *color_string, void *log_ctx) · 10 unmodified lines
248248 color_table_compare);
249249 if (!entry) {
250250 av_log(log_ctx, AV_LOG_ERROR, "Cannot find color '%s'\n", color_string);
251− return -1;
251+ return AVERROR(EINVAL);
252252 }
253253 memcpy(rgba_color, entry->rgba_color, 4);
254254 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t