Commit 93648ee4 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  rv34: Fix a memory leak on errors
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 52dc3600 fdbd924b
......@@ -1500,8 +1500,10 @@ av_cold int ff_rv34_decode_init(AVCodecContext *avctx)
ff_rv40dsp_init(&r->rdsp);
#endif
if ((ret = rv34_decoder_alloc(r)) < 0)
if ((ret = rv34_decoder_alloc(r)) < 0) {
ff_MPV_common_end(&r->s);
return ret;
}
if(!intra_vlcs[0].cbppattern[0].bits)
rv34_init_tables();
......@@ -1522,9 +1524,11 @@ int ff_rv34_decode_init_thread_copy(AVCodecContext *avctx)
r->tmp_b_block_base = NULL;
if ((err = ff_MPV_common_init(&r->s)) < 0)
return err;
if ((err = rv34_decoder_alloc(r)) < 0)
if ((err = rv34_decoder_alloc(r)) < 0) {
ff_MPV_common_end(&r->s);
return err;
}
}
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment