]> granicus.if.org Git - libvpx/commitdiff
Fix a bug in vpxenc reading raw input frame
authorYaowu Xu <yaowu@google.com>
Tue, 19 Nov 2013 18:17:04 +0000 (10:17 -0800)
committerYaowu Xu <yaowu@google.com>
Tue, 19 Nov 2013 18:28:30 +0000 (10:28 -0800)
The bug was introduced in 00a35aab. The reading of raw yuv input frame
was off by 4 bytes.

Change-Id: I6923ea5528aa529a47a06b64adca8f94847f19a6

ivfdec.c

index 51f4a094ad66ba5e6939121ff858cb86ef74c61c..4a0816ff0aeee1a6a66fe00aece1df777669b565 100644 (file)
--- a/ivfdec.c
+++ b/ivfdec.c
@@ -61,11 +61,12 @@ int file_is_ivf(struct VpxInputContext *input_ctx) {
     }
   }
 
-  if (!is_ivf)
+  if (!is_ivf) {
     rewind(input_ctx->file);
-  else
+    input_ctx->detect.buf_read = 0;
+  } else {
     input_ctx->detect.position = 4;
-
+  }
   return is_ivf;
 }