Fix the decoder seg fault when frame is corrupted.

BUG=webm:1399

Change-Id: I1e006e0260d9b56a4d2273659ca19b86c69c474b
This commit is contained in:
Jerome Jiang 2017-04-20 14:48:22 -07:00
parent 30ef50b522
commit 25c1bada72

View File

@ -977,7 +977,7 @@ static int main_loop(int argc, const char **argv_) {
if (do_md5) {
update_image_md5(img, planes, &md5_ctx);
} else {
write_image_file(img, planes, outfile);
if (!corrupted) write_image_file(img, planes, outfile);
}
} else {
generate_filename(outfile_pattern, outfile_name, PATH_MAX, img->d_w,