Fixes: signed integer overflow: 538976288 * 538976288 cannot be represented in type 'int' Fixes: 27473/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5758978289827840
Unified · Split
| @@ -2354,12 +2354,10 @@ FF_ENABLE_DEPRECATION_WARNINGS · 2353 unmodified lines | ||
| 2354 | 2354 | if (tmcd_ctx->tmcd_flags & 0x0008) { |
| 2355 | 2355 | int timescale = AV_RB32(st->codecpar->extradata + 8); |
| 2356 | 2356 | int framedur = AV_RB32(st->codecpar->extradata + 12); |
| 2357 | − st->avg_frame_rate.num *= timescale; | |
| 2358 | − st->avg_frame_rate.den *= framedur; | |
| 2357 | + st->avg_frame_rate = av_mul_q(st->avg_frame_rate, (AVRational){timescale, framedur}); | |
| 2359 | 2358 | #if FF_API_LAVF_AVCTX |
| 2360 | 2359 | FF_DISABLE_DEPRECATION_WARNINGS |
| 2361 | − st->codec->time_base.den *= timescale; | |
| 2362 | − st->codec->time_base.num *= framedur; | |
| 2360 | + st->codec->time_base = av_mul_q(st->codec->time_base , (AVRational){framedur, timescale}); | |
| 2363 | 2361 | FF_ENABLE_DEPRECATION_WARNINGS |
| 2364 | 2362 | #endif |
| 2365 | 2363 | } |