vpxdec updated to use !feof() instead of *buf_sz in readframe()
authorJames Berry <jamesberry@google.com>
Thu, 22 Sep 2011 19:03:28 +0000 (15:03 -0400)
committerJames Berry <jamesberry@google.com>
Thu, 22 Sep 2011 19:03:28 +0000 (15:03 -0400)
For partial droped frames using *buf_sz could incorrectly terminate
a decode.

Change-Id: Id4a1166fa9ae6c0aa7e9f214bfa4c0be0ea82c1c

vpxdec.c

index 304608b..6a1a0f5 100644 (file)
--- a/vpxdec.c
+++ b/vpxdec.c
@@ -303,7 +303,7 @@ static int read_frame(struct input_ctx      *input,
 
     *buf_sz = new_buf_sz;
 
-    if (*buf_sz)
+    if (!feof(infile))
     {
         if (fread(*buf, 1, *buf_sz, infile) != *buf_sz)
         {