Merge commit '5b35b290dd76db64f079b3940f6148c8f273fc17'
authorClément Bœsch <u@pkh.me>
Sun, 19 Jun 2016 11:48:09 +0000 (13:48 +0200)
committerClément Bœsch <u@pkh.me>
Sun, 19 Jun 2016 11:48:09 +0000 (13:48 +0200)
* commit '5b35b290dd76db64f079b3940f6148c8f273fc17':
  h264: remove a stale comment

Merged-by: Clément Bœsch <u@pkh.me>
1  2 
libavcodec/h264.c

@@@ -679,14 -634,29 +679,12 @@@ static void decode_postinit(H264Contex
              out_idx = i;
          }
      if (h->avctx->has_b_frames == 0 &&
 -        (h->delayed_pic[0]->f->key_frame || h->mmco_reset))
 +        (h->delayed_pic[0]->f->key_frame || h->delayed_pic[0]->mmco_reset))
          h->next_outputed_poc = INT_MIN;
 -    out_of_order = !out->f->key_frame && !h->mmco_reset &&
 -                   (out->poc < h->next_outputed_poc);
 -
 -    if (sps->bitstream_restriction_flag &&
 -        h->avctx->has_b_frames >= sps->num_reorder_frames) {
 -    } else if (out_of_order && pics - 1 == h->avctx->has_b_frames &&
 -               h->avctx->has_b_frames < MAX_DELAYED_PIC_COUNT) {
 -        if (invalid + cnt < MAX_DELAYED_PIC_COUNT) {
 -            h->avctx->has_b_frames = FFMAX(h->avctx->has_b_frames, cnt);
 -        }
 -        h->low_delay = 0;
 -    } else if (h->low_delay &&
 -               ((h->next_outputed_poc != INT_MIN &&
 -                 out->poc > h->next_outputed_poc + 2) ||
 -                cur->f->pict_type == AV_PICTURE_TYPE_B)) {
 -        h->low_delay = 0;
 -        h->avctx->has_b_frames++;
 -    }
 +    out_of_order = out->poc < h->next_outputed_poc;
  
 -    if (pics > h->avctx->has_b_frames) {
 +    if (out_of_order || pics > h->avctx->has_b_frames) {
          out->reference &= ~DELAYED_PIC_REF;
-         // for frame threading, the owner must be the second field's thread or
-         // else the first thread can release the picture and reuse it unsafely
          for (i = out_idx; h->delayed_pic[i]; i++)
              h->delayed_pic[i] = h->delayed_pic[i + 1];
      }