Merge commit '42df71d9bbb1a5b4bce0bb34417692565c72d390'

* commit '42df71d9bbb1a5b4bce0bb34417692565c72d390':
  ratecontrol: Check memory allocation

Conflicts:
	libavcodec/ratecontrol.c

See: 0898a6d4e4
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-06-01 02:26:03 +02:00
commit abee1972ef
1 changed files with 3 additions and 1 deletions

View File

@ -223,8 +223,10 @@ av_cold int ff_rate_control_init(MpegEncContext *s)
p = next; p = next;
} }
if (init_pass2(s) < 0) if (init_pass2(s) < 0) {
ff_rate_control_uninit(s);
return -1; return -1;
}
// FIXME maybe move to end // FIXME maybe move to end
if ((s->avctx->flags & CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID) { if ((s->avctx->flags & CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID) {