This actually matches what av_get_double did earlier, the
0.0/0.0 division was intentional, for producing NAN.
Still keeping the check for the return value from
av_get_number, for clarity.
Signed-off-by: Martin Storsjö <martin@martin.st>
int den=1;
if (av_get_number(obj, name, o_out, &num, &den, &intnum) < 0)
- return -1;
+ return NAN;
return num*intnum/den;
}
int den=1;
if (av_get_number(obj, name, o_out, &num, &den, &intnum) < 0)
- return (AVRational){-1, 0};
+ return (AVRational){0, 0};
if (num == 1.0 && (int)intnum == intnum)
return (AVRational){intnum, den};
else