Mercurial > libavcore.hg
changeset 2:b7595fe2d4a4 libavcore
Make av_parse_video_size() and av_parse_video_rate() return
AVERROR(EINVAL) rather than -1 in case of unsuccess.
author | stefano |
---|---|
date | Mon, 26 Jul 2010 23:12:38 +0000 |
parents | d2641c727ec5 |
children | af138a6c3924 |
files | parseutils.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/parseutils.c Mon Jul 26 23:12:28 2010 +0000 +++ b/parseutils.c Mon Jul 26 23:12:38 2010 +0000 @@ -107,7 +107,7 @@ frame_height = strtol(p, &p, 10); } if (frame_width <= 0 || frame_height <= 0) - return -1; + return AVERROR(EINVAL); *width_ptr = frame_width; *height_ptr = frame_height; return 0; @@ -145,6 +145,6 @@ frame_rate->num = time_base.num; } if (frame_rate->num <= 0 || frame_rate->den <= 0) - return -1; + return AVERROR(EINVAL); return 0; }