summaryrefslogtreecommitdiff
path: root/libavcodec/ratecontrol.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-01 02:26:03 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-06-01 02:27:26 +0200
commitabee1972ef8a88fde0bff5f40f4767cb3150d26e (patch)
treed687cb497295227bc6c86abc0c879ee97f0d9fac /libavcodec/ratecontrol.c
parent6ed8341cb163e4c253449458aa21a0b3aab1e2b6 (diff)
parent42df71d9bbb1a5b4bce0bb34417692565c72d390 (diff)
Merge commit '42df71d9bbb1a5b4bce0bb34417692565c72d390'
* commit '42df71d9bbb1a5b4bce0bb34417692565c72d390': ratecontrol: Check memory allocation Conflicts: libavcodec/ratecontrol.c See: 0898a6d4e4b669704fce663f610aa43dd7483fe9 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ratecontrol.c')
-rw-r--r--libavcodec/ratecontrol.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c
index 4eb363013c..c6a51a2486 100644
--- a/libavcodec/ratecontrol.c
+++ b/libavcodec/ratecontrol.c
@@ -223,8 +223,10 @@ av_cold int ff_rate_control_init(MpegEncContext *s)
p = next;
}
- if (init_pass2(s) < 0)
+ if (init_pass2(s) < 0) {
+ ff_rate_control_uninit(s);
return -1;
+ }
// FIXME maybe move to end
if ((s->avctx->flags & CODEC_FLAG_PASS2) && s->avctx->rc_strategy == FF_RC_STRATEGY_XVID) {