ref: 220bc3a0133fe1964df7e49f718877ca7b887552
parent: 7ef157cccec52657529495206383331c279397f1
author: Minghai Shang <minghai@google.com>
date: Thu Jan 15 10:44:11 EST 2015
[two pass temporal svc]Fix crash issue in transcoder app caused by last fix. Change-Id: I78ecc8ec3fa3ba5f69bb23813e68a5255d0534e1
--- a/vp9/encoder/vp9_svc_layercontext.c
+++ b/vp9/encoder/vp9_svc_layercontext.c
@@ -344,7 +344,8 @@
buf = vp9_lookahead_peek(cpi->lookahead, 0);
if (cpi->oxcf.error_resilient_mode == 0 && cpi->oxcf.pass == 2 &&
cpi->svc.encode_empty_frame_state == NEED_TO_ENCODE &&
- lc->rc.frames_to_key != 0 && !(buf->flags & VPX_EFLAG_FORCE_KF)) {
+ lc->rc.frames_to_key != 0 &&
+ !(buf != NULL && (buf->flags & VPX_EFLAG_FORCE_KF))) {
if ((cpi->svc.number_temporal_layers > 1 &&
cpi->svc.temporal_layer_id < cpi->svc.number_temporal_layers - 1) ||
(cpi->svc.number_spatial_layers > 1 &&