// -----------------
// For decoders, you only have to include `vpx_decoder.h` and then any
// header files for the specific codecs you use. In this case, we're using
-// vp8. The `VPX_CODEC_DISABLE_COMPAT` macro can be defined to ensure
-// strict compliance with the latest SDK by disabling some backwards
-// compatibility features. Defining this macro is encouraged.
+// vp8.
//
// Initializing The Codec
// ----------------------
#include <stdlib.h>
#include <string.h>
-#define VPX_CODEC_DISABLE_COMPAT 1
-
#include "vpx/vp8dx.h"
#include "vpx/vpx_decoder.h"
if (!decoder)
die("Unknown input codec.");
- printf("Using %s\n", vpx_codec_iface_name(decoder->interface()));
+ printf("Using %s\n", vpx_codec_iface_name(decoder->codec_interface()));
- if (vpx_codec_dec_init(&codec, decoder->interface(), NULL, 0))
+ if (vpx_codec_dec_init(&codec, decoder->codec_interface(), NULL, 0))
die_codec(&codec, "Failed to initialize decoder.");
while (vpx_video_reader_read_frame(reader)) {
size_t frame_size = 0;
const unsigned char *frame = vpx_video_reader_get_frame(reader,
&frame_size);
- if (vpx_codec_decode(&codec, frame, frame_size, NULL, 0))
+ if (vpx_codec_decode(&codec, frame, (unsigned int)frame_size, NULL, 0))
die_codec(&codec, "Failed to decode frame.");
while ((img = vpx_codec_get_frame(&codec, &iter)) != NULL) {