]> granicus.if.org Git - libvpx/commitdiff
[two pass temporal svc]Fix crash issue in transcoder app caused by last fix.
authorMinghai Shang <minghai@google.com>
Thu, 15 Jan 2015 23:44:11 +0000 (15:44 -0800)
committerMinghai Shang <minghai@google.com>
Fri, 16 Jan 2015 00:59:54 +0000 (16:59 -0800)
Change-Id: I78ecc8ec3fa3ba5f69bb23813e68a5255d0534e1

vp9/encoder/vp9_svc_layercontext.c

index ef6174ec6c7f25d9ea0048218eba3743c84b0524..82bce37808315da75229abe3241cd1e50478b9c0 100644 (file)
@@ -344,7 +344,8 @@ int vp9_svc_start_frame(VP9_COMP *const cpi) {
   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 &&