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

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


Author: stefano
Date: Tue Jul 27 01:12:48 2010
New Revision: 24524

Log:
Avoid the use of an intermediary variable in
av_parse_video_rate(). Simplify.

Modified:
   trunk/libavcore/parseutils.c

Modified: trunk/libavcore/parseutils.c
==============================================================================
--- trunk/libavcore/parseutils.c	Tue Jul 27 01:12:45 2010	(r24523)
+++ trunk/libavcore/parseutils.c	Tue Jul 27 01:12:48 2010	(r24524)
@@ -139,9 +139,7 @@ int av_parse_video_rate(AVRational *rate
             rate->num = 0;
     } else {
         /* Finally we give up and parse it as double */
-        AVRational time_base = av_d2q(strtod(arg, 0), 1001000);
-        rate->den = time_base.den;
-        rate->num = time_base.num;
+        *rate = av_d2q(strtod(arg, 0), 1001000);
     }
     if (rate->num <= 0 || rate->den <= 0)
         return AVERROR(EINVAL);



More information about the ffmpeg-cvslog mailing list