[FFmpeg-cvslog] r24521 - trunk/libavcore/parseutils.c

stefano subversion
Tue Jul 27 01:12:39 CEST 2010


Author: stefano
Date: Tue Jul 27 01:12:38 2010
New Revision: 24521

Log:
Make av_parse_video_size() and av_parse_video_rate() return
AVERROR(EINVAL) rather than -1 in case of unsuccess.

Modified:
   trunk/libavcore/parseutils.c

Modified: trunk/libavcore/parseutils.c
==============================================================================
--- trunk/libavcore/parseutils.c	Tue Jul 27 01:12:35 2010	(r24520)
+++ trunk/libavcore/parseutils.c	Tue Jul 27 01:12:38 2010	(r24521)
@@ -107,7 +107,7 @@ int av_parse_video_size(int *width_ptr, 
         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 *fram
         frame_rate->num = time_base.num;
     }
     if (frame_rate->num <= 0 || frame_rate->den <= 0)
-        return -1;
+        return AVERROR(EINVAL);
     return 0;
 }



More information about the ffmpeg-cvslog mailing list