mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
Merge remote-tracking branch 'qatar/master'
* qatar/master: rv34: Fix a memory leak on errors Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
93648ee47b
@ -1500,8 +1500,10 @@ av_cold int ff_rv34_decode_init(AVCodecContext *avctx)
|
|||||||
ff_rv40dsp_init(&r->rdsp);
|
ff_rv40dsp_init(&r->rdsp);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((ret = rv34_decoder_alloc(r)) < 0)
|
if ((ret = rv34_decoder_alloc(r)) < 0) {
|
||||||
|
ff_MPV_common_end(&r->s);
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
if(!intra_vlcs[0].cbppattern[0].bits)
|
if(!intra_vlcs[0].cbppattern[0].bits)
|
||||||
rv34_init_tables();
|
rv34_init_tables();
|
||||||
@ -1522,8 +1524,10 @@ int ff_rv34_decode_init_thread_copy(AVCodecContext *avctx)
|
|||||||
r->tmp_b_block_base = NULL;
|
r->tmp_b_block_base = NULL;
|
||||||
if ((err = ff_MPV_common_init(&r->s)) < 0)
|
if ((err = ff_MPV_common_init(&r->s)) < 0)
|
||||||
return err;
|
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 err;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user