Merge commit '4cec43a9eeb58eb9e581a2d9d25f78e5bfbb0960'
authorClément Bœsch <clement@stupeflix.com>
Wed, 29 Jun 2016 15:59:57 +0000 (17:59 +0200)
committerClément Bœsch <clement@stupeflix.com>
Wed, 29 Jun 2016 15:59:57 +0000 (17:59 +0200)
* commit '4cec43a9eeb58eb9e581a2d9d25f78e5bfbb0960':
  h264: move calculating the POC out of h264_slice_header_parse()

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

@@@ -1693,9 -1439,13 +1689,13 @@@ int ff_h264_decode_slice_header(H264Con
      int i, j, ret = 0;
  
      ret = h264_slice_header_parse(h, sl);
 -    if (ret < 0)
 +    if (ret) // can not be ret<0 because of SLICE_SKIPED, SLICE_SINGLETHREAD, ...
          return ret;
  
+     if (!h->setup_finished)
+         ff_h264_init_poc(h->cur_pic_ptr->field_poc, &h->cur_pic_ptr->poc,
+                          h->ps.sps, &h->poc, h->picture_structure, h->nal_ref_idc);
      ret = ff_h264_build_ref_list(h, sl);
      if (ret < 0)
          return ret;