all repos — mgba @ 95f07c3131eb44a17283f8754c750a68a9a07476

mGBA Game Boy Advance Emulator

Test: Fix rebaselining tests with too few frames
Vicki Pfau vi@endrift.com
Wed, 12 Aug 2020 22:56:26 -0700
commit

95f07c3131eb44a17283f8754c750a68a9a07476

parent

435ddd2ffc410a972e5e853e3743e05b64b246fb

1 files changed, 8 insertions(+), 0 deletions(-)

jump to
M src/platform/test/cinema-main.csrc/platform/test/cinema-main.c

@@ -1085,6 +1085,14 @@ while (!expected.data) {

if (!FFmpegDecoderRead(&decoder)) { CIlog(1, "Failed to read more frames. EOF?\n"); test->status = CI_FAIL; + if (rebaseline && !FFmpegEncoderIsOpen(&encoder)) { + _replayBaseline(test, &encoder, &image, frame); + if (test->status == CI_ERROR) { + break; + } + encoder.d.postVideoFrame(&encoder.d, image.data, image.stride); + core->setAVStream(core, &encoder.d); + } break; } }