diff options
author | James Bankoski <jimbankoski@google.com> | 2016-10-25 18:34:06 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-10-25 18:34:07 +0000 |
commit | f53d3363ac41b9997e07f5d8faac1f734c8ddc9c (patch) | |
tree | 975499d2e1487d9f2cf7b80f613201d1f182012d | |
parent | c192def8f3433d6713824fd31e76e9fa58cfd7f9 (diff) | |
parent | 7ef094c02f261f3599072eb1fa9aaa2477f9d47e (diff) | |
download | libvpx-f53d3363ac41b9997e07f5d8faac1f734c8ddc9c.tar libvpx-f53d3363ac41b9997e07f5d8faac1f734c8ddc9c.tar.gz libvpx-f53d3363ac41b9997e07f5d8faac1f734c8ddc9c.tar.bz2 libvpx-f53d3363ac41b9997e07f5d8faac1f734c8ddc9c.zip |
Merge "vpxdec: return fail if frame fails to decode."
-rw-r--r-- | vpxdec.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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 @@ static int main_loop(int argc, const char **argv_) { 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 @@ static int main_loop(int argc, const char **argv_) { // 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; } } |