mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-19 05:55:07 +00:00
Fix style: if( -> if (.
Originally committed as revision 25764 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
cef4b74bf2
commit
bdb47f3a2c
@ -35,21 +35,21 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
|
|||||||
double ratio;
|
double ratio;
|
||||||
int64_t gcd;
|
int64_t gcd;
|
||||||
|
|
||||||
if(args) {
|
if (args) {
|
||||||
if(sscanf(args, "%d:%d", &aspect->aspect.num, &aspect->aspect.den) < 2) {
|
if (sscanf(args, "%d:%d", &aspect->aspect.num, &aspect->aspect.den) < 2) {
|
||||||
if(sscanf(args, "%lf", &ratio) < 1)
|
if (sscanf(args, "%lf", &ratio) < 1)
|
||||||
return -1;
|
return -1;
|
||||||
aspect->aspect = av_d2q(ratio, 100);
|
aspect->aspect = av_d2q(ratio, 100);
|
||||||
} else {
|
} else {
|
||||||
gcd = av_gcd(FFABS(aspect->aspect.num), FFABS(aspect->aspect.den));
|
gcd = av_gcd(FFABS(aspect->aspect.num), FFABS(aspect->aspect.den));
|
||||||
if(gcd) {
|
if (gcd) {
|
||||||
aspect->aspect.num /= gcd;
|
aspect->aspect.num /= gcd;
|
||||||
aspect->aspect.den /= gcd;
|
aspect->aspect.den /= gcd;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(aspect->aspect.den == 0)
|
if (aspect->aspect.den == 0)
|
||||||
aspect->aspect = (AVRational) {0, 1};
|
aspect->aspect = (AVRational) {0, 1};
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user