Merge "Add zero offset checking in SSE2 sub-pixel filter function"
[profile/ivi/libvpx.git] / examples / decoder_tmpl.c
index 59f0c11..c70681b 100644 (file)
@@ -1,10 +1,11 @@
 /*
- *  Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
+ *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
  *
- *  Use of this source code is governed by a BSD-style license and patent
- *  grant that can be found in the LICENSE file in the root of the source
- *  tree. All contributing project authors may be found in the AUTHORS
- *  file in the root of the source tree.
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
  */
 
 
@@ -18,7 +19,7 @@
 #define VPX_CODEC_DISABLE_COMPAT 1
 #include "vpx/vpx_decoder.h"
 #include "vpx/vp8dx.h"
-#define interface (&vpx_codec_vp8_dx_algo)
+#define interface (vpx_codec_vp8_dx())
 @EXTRA_INCLUDES
 
 
@@ -60,8 +61,8 @@ int main(int argc, char **argv) {
         die("Failed to open %s for writing", argv[2]);
 
     /* Read file header */
-    fread(file_hdr, 1, IVF_FILE_HDR_SZ, infile);
-    if(!(file_hdr[0]=='D' && file_hdr[1]=='K' && file_hdr[2]=='I'
+    if(!(fread(file_hdr, 1, IVF_FILE_HDR_SZ, infile) == IVF_FILE_HDR_SZ
+         && file_hdr[0]=='D' && file_hdr[1]=='K' && file_hdr[2]=='I'
          && file_hdr[3]=='F'))
         die("%s is not an IVF file.", argv[1]);