avcodec/dovi_rpuenc: do not divide by a zero frame rate denominator

Fixes: TPu5aVjgBh7t/testcase/crafted.hevc
Fixes: TPu5aVjgBh7t
Fixes: AISLE-2026-0150-00819
Fixes: division by zero
Division by zero Replicated through UnModified FFmpeg with UBSAN

Found-by: Joshua Rogers (AISLE)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer authored and michaelni committed 2026-11-06 04:40:30 +00:00
1 parent 34908ab5e1
commit ab28d57ba2
1 file changed
+1 -1
+1 -1
View File
@@ -183,7 +183,7 @@ static av_cold int dovi_configure_ext(DOVIContext *s, enum AVCodecID codec_id,
}
pps = width * height;
if (framerate.num) {
if (framerate.num > 0 && framerate.den > 0) {
pps = pps * framerate.num / framerate.den;
} else {
pps *= 25; /* sanity fallback */