]> granicus.if.org Git - libvpx/commitdiff
Removing redundant decoder_init flag.
authorDmitry Kovalev <dkovalev@google.com>
Thu, 15 May 2014 21:59:15 +0000 (14:59 -0700)
committerDmitry Kovalev <dkovalev@google.com>
Thu, 15 May 2014 21:59:15 +0000 (14:59 -0700)
Change-Id: Ieee7a7e3c40d6bcc9fa4df8d10ee9620995aa691

vp9/vp9_dx_iface.c

index 6198250203636786467ede8970ee1be1c77fc129..c6929046b4c6fa81ebb43bbc2c585a9327d57219 100644 (file)
@@ -32,7 +32,6 @@ struct vpx_codec_alg_priv {
   vpx_codec_priv_t        base;
   vpx_codec_dec_cfg_t     cfg;
   vp9_stream_info_t       si;
-  int                     decoder_init;
   struct VP9Decoder *pbi;
   int                     postproc_cfg_set;
   vp8_postproc_cfg_t      postproc_cfg;
@@ -285,12 +284,10 @@ static vpx_codec_err_t decode_one(vpx_codec_alg_priv_t *ctx,
   }
 
   // Initialize the decoder instance on the first frame
-  if (!ctx->decoder_init) {
+  if (ctx->pbi == NULL) {
     init_decoder(ctx);
     if (ctx->pbi == NULL)
       return VPX_CODEC_ERROR;
-
-    ctx->decoder_init = 1;
   }
 
   // Set these even if already initialized.  The caller may have changed the