ref: f53d3363ac41b9997e07f5d8faac1f734c8ddc9c
parent: c192def8f3433d6713824fd31e76e9fa58cfd7f9
parent: 7ef094c02f261f3599072eb1fa9aaa2477f9d47e
author: James Bankoski <jimbankoski@google.com>
date: Tue Oct 25 14:34:06 EDT 2016
Merge "vpxdec: return fail if frame fails to decode."
--- a/vpxdec.c
+++ b/vpxdec.c
@@ -9,11 +9,11 @@
*/
#include <assert.h>
+#include <limits.h>
+#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
-#include <stdarg.h>
#include <string.h>
-#include <limits.h>
#include "./vpx_config.h"
@@ -780,8 +780,8 @@
const char *detail = vpx_codec_error_detail(&decoder);
warn("Failed to decode frame %d: %s", frame_in,
vpx_codec_error(&decoder));
-
if (detail) warn("Additional information: %s", detail);
+ frames_corrupted++;
if (!keep_going) goto fail;
}
@@ -800,6 +800,8 @@
// Flush the decoder in frame parallel decode.
if (vpx_codec_decode(&decoder, NULL, 0, NULL, 0)) {
warn("Failed to flush decoder: %s", vpx_codec_error(&decoder));
+ frames_corrupted++;
+ if (!keep_going) goto fail;
}
}