diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-07-26 23:12:38 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-07-26 23:12:38 +0000 |
commit | afead10638badf35f60caec4da4dd6d5aab5d35c (patch) | |
tree | 887d125d544f3176eecb3eec302f707c60adda8a /libavcore/parseutils.c | |
parent | b964a2935eb9d1739666321fbfe6822b0182c02e (diff) | |
download | ffmpeg-streaming-afead10638badf35f60caec4da4dd6d5aab5d35c.zip ffmpeg-streaming-afead10638badf35f60caec4da4dd6d5aab5d35c.tar.gz |
Make av_parse_video_size() and av_parse_video_rate() return
AVERROR(EINVAL) rather than -1 in case of unsuccess.
Originally committed as revision 24521 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcore/parseutils.c')
-rw-r--r-- | libavcore/parseutils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcore/parseutils.c b/libavcore/parseutils.c index 1267369..e7d992c 100644 --- a/libavcore/parseutils.c +++ b/libavcore/parseutils.c @@ -107,7 +107,7 @@ int av_parse_video_size(int *width_ptr, int *height_ptr, const char *str) 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 @@ int av_parse_video_rate(AVRational *frame_rate, const char *arg) frame_rate->num = time_base.num; } if (frame_rate->num <= 0 || frame_rate->den <= 0) - return -1; + return AVERROR(EINVAL); return 0; } |