Merge commit '77a1e2c5f8f8250dfacff24b993eb473260ed13e'
authorClément Bœsch <clement@stupeflix.com>
Wed, 29 Jun 2016 12:58:31 +0000 (14:58 +0200)
committerClément Bœsch <clement@stupeflix.com>
Wed, 29 Jun 2016 12:58:31 +0000 (14:58 +0200)
* commit '77a1e2c5f8f8250dfacff24b993eb473260ed13e':
  h264: move direct mode inits out of h264_slice_header_parse()

Merged-by: Clément Bœsch <clement@stupeflix.com>
1  2 
libavcodec/h264_slice.c

@@@ -1714,10 -1460,12 +1710,14 @@@ int ff_h264_decode_slice_header(H264Con
      if (ret < 0)
          return ret;
  
+     if (sl->slice_type_nos == AV_PICTURE_TYPE_B && !sl->direct_spatial_mv_pred)
+         ff_h264_direct_dist_scale_factor(h, sl);
+     ff_h264_direct_ref_list_init(h, sl);
      if (h->avctx->skip_loop_filter >= AVDISCARD_ALL ||
          (h->avctx->skip_loop_filter >= AVDISCARD_NONKEY &&
 +         h->nal_unit_type != NAL_IDR_SLICE) ||
 +        (h->avctx->skip_loop_filter >= AVDISCARD_NONINTRA &&
           sl->slice_type_nos != AV_PICTURE_TYPE_I) ||
          (h->avctx->skip_loop_filter >= AVDISCARD_BIDIR  &&
           sl->slice_type_nos == AV_PICTURE_TYPE_B) ||