Test: Fix rebaselining tests with too few frames
Vicki Pfau vi@endrift.com
Wed, 12 Aug 2020 22:56:26 -0700
1 files changed,
8 insertions(+),
0 deletions(-)
jump to
M
src/platform/test/cinema-main.c
→
src/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; } }