Test: Fix rebaselining tests with too few frames

This commit is contained in:
Vicki Pfau 2020-08-12 22:56:26 -07:00
parent 435ddd2ffc
commit 95f07c3131
1 changed files with 8 additions and 0 deletions

View File

@ -1085,6 +1085,14 @@ void CInemaTestRun(struct CInemaTest* test) {
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;
}
}