diff --git a/vp8/dixie/dixie.c b/vp8/dixie/dixie.c
index 633ac6f4bb1ffd9b1788234a75a52e90304c110c..596c23cef703da12eed0795fcc08db9509580ea0 100644
--- a/vp8/dixie/dixie.c
+++ b/vp8/dixie/dixie.c
@@ -11,6 +11,35 @@
 #include "bit_ops.h"
 #include "dixie.h"
 
+
+void
+decode_frame(struct vp8_decoder_ctx *ctx,
+             const unsigned char    *data,
+             unsigned int            sz)
+{
+    vpx_codec_err_t  res;
+
+    if ((res = vp8_parse_frame_header(data, sz, &ctx->frame_hdr)))
+        vpx_internal_error(&ctx->error, res, "Failed to parse frame header");
+
+    if (ctx->frame_hdr.is_experimental)
+        vpx_internal_error(&ctx->error, VPX_CODEC_UNSUP_BITSTREAM,
+                           "Experimental bitstreams not supported.");
+
+    if (ctx->frame_hdr.version != 0)
+        vpx_internal_error(&ctx->error, VPX_CODEC_UNSUP_BITSTREAM,
+                           "Unsupported version %d", ctx->frame_hdr.version);
+
+    if (ctx->frame_hdr.is_keyframe)
+        if (ctx->frame_hdr.kf.scale_w || ctx->frame_hdr.kf.scale_h)
+            vpx_internal_error(&ctx->error, VPX_CODEC_UNSUP_BITSTREAM,
+                               "Spatial resampling not supported.");
+
+
+
+}
+
+
 vpx_codec_err_t
 vp8_parse_frame_header(const unsigned char   *data,
                        unsigned int           sz,
@@ -52,3 +81,20 @@ vp8_parse_frame_header(const unsigned char   *data,
 
     return VPX_CODEC_OK;
 }
+
+
+vpx_codec_err_t
+vp8_dixie_decode_frame(struct vp8_decoder_ctx *ctx,
+                       const unsigned char    *data,
+                       unsigned int            sz)
+{
+    volatile struct vp8_decoder_ctx *ctx_ = ctx;
+
+    ctx->error.error_code = VPX_CODEC_OK;
+    ctx->error.has_detail = 0;
+
+    if (!setjmp(ctx->error.jmp))
+        decode_frame(ctx, data, sz);
+
+    return ctx_->error.error_code;
+}
diff --git a/vp8/dixie/dixie.h b/vp8/dixie/dixie.h
index 9eb45c2d4ac122fc69d25cf29c57d3880f48d71e..5901c5eaf5b2aa551d0e4beb8d1e62c630a47f99 100644
--- a/vp8/dixie/dixie.h
+++ b/vp8/dixie/dixie.h
@@ -27,9 +27,25 @@ struct vp8_frame_hdr
     } kf;
 };
 
+
+struct vp8_decoder_ctx
+{
+    struct vpx_internal_error_info  error;
+
+    struct vp8_frame_hdr            frame_hdr;
+};
+
+
 vpx_codec_err_t
 vp8_parse_frame_header(const unsigned char   *data,
                        unsigned int           sz,
                        struct vp8_frame_hdr  *hdr);
 
+
+vpx_codec_err_t
+vp8_dixie_decode_frame(struct vp8_decoder_ctx *ctx,
+                       const unsigned char    *data,
+                       unsigned int            sz);
+
+
 #endif
diff --git a/vp8/vp8_dixie_iface.c b/vp8/vp8_dixie_iface.c
index 612c262d2ecc9cfdfbefb33a469e4aa21dbf6033..af118696e8c97a0cb2b4b0e64376a5830ab9e4e6 100644
--- a/vp8/vp8_dixie_iface.c
+++ b/vp8/vp8_dixie_iface.c
@@ -25,6 +25,7 @@ struct vpx_codec_alg_priv
     vpx_codec_priv_t        base;
     vpx_codec_dec_cfg_t     cfg;
     vp8_stream_info_t       si;
+    struct vp8_decoder_ctx  decoder_ctx;
     vpx_image_t             img;
     int                     img_setup;
     int                     img_avail;
@@ -142,9 +143,11 @@ static vpx_codec_err_t vp8_decode(vpx_codec_alg_priv_t  *ctx,
 {
     vpx_codec_err_t res = VPX_CODEC_OK;
 
-    ctx->img_avail = 0;
-
+    res = vp8_dixie_decode_frame(&ctx->decoder_ctx, data, data_sz);
+    if(res)
+        update_error_state(ctx, &ctx->decoder_ctx.error);
 
+    ctx->img_avail = 0;
     return res;
 }