]> granicus.if.org Git - libvpx/commitdiff
call vp[89]_clear_system_state after longjmp
authorJames Zern <jzern@google.com>
Thu, 10 Jul 2014 19:36:28 +0000 (12:36 -0700)
committerJames Zern <jzern@google.com>
Thu, 10 Jul 2014 19:36:28 +0000 (12:36 -0700)
restore the environment post encode/decode failure

Change-Id: I3c72e2260a616432eaf1f9545d4fb4d8e45cc7b0

vp8/decoder/onyxd_if.c
vp8/encoder/onyx_if.c
vp8/vp8_dx_iface.c
vp9/decoder/vp9_decoder.c

index 29fea616bc89de325fa246ce3f788632fee3cdd1..1d763b6bfae2c9149b7fe0af2621fe6c0043b380 100644 (file)
@@ -386,6 +386,7 @@ int vp8dx_receive_compressed_data(VP8D_COMP *pbi, size_t size,
 
 decode_exit:
     pbi->common.error.setjmp = 0;
+    vp8_clear_system_state();
     return retcode;
 }
 int vp8dx_get_raw_frame(VP8D_COMP *pbi, YV12_BUFFER_CONFIG *sd, int64_t *time_stamp, int64_t *time_end_stamp, vp8_ppflags_t *flags)
index 09854a544fa4266a3d426cdc70e4c844dc0fc9df..373dbebd962c9c90e285a9b50ca89afb8d27141b 100644 (file)
@@ -4886,6 +4886,7 @@ int vp8_get_compressed_data(VP8_COMP *cpi, unsigned int *frame_flags, unsigned l
     if (setjmp(cpi->common.error.jmp))
     {
         cpi->common.error.setjmp = 0;
+        vp8_clear_system_state();
         return VPX_CODEC_CORRUPT_FRAME;
     }
 
index 56394fb1ca81f57c7a01049719bcaff9ad1b96d2..b695ddc8d4fc9ccf1f45a3cfa55f3a38223e32c5 100644 (file)
@@ -409,6 +409,7 @@ static vpx_codec_err_t vp8_decode(vpx_codec_alg_priv_t  *ctx,
                 if (setjmp(pbi->common.error.jmp))
                 {
                     pbi->common.error.setjmp = 0;
+                    vp8_clear_system_state();
                     /* same return value as used in vp8dx_receive_compressed_data */
                     return -1;
                 }
index a1a78a9471101ee058bfa54b0fee2c288e459d63..e32637b06fc1635c5e8858b7b871497b96727bf4 100644 (file)
@@ -246,6 +246,7 @@ int vp9_receive_compressed_data(VP9Decoder *pbi,
 
   if (setjmp(cm->error.jmp)) {
     cm->error.setjmp = 0;
+    vp9_clear_system_state();
 
     // We do not know if the missing frame(s) was supposed to update
     // any of the reference buffers, but we act conservative and