Commit c8f7a233 authored by Clément Bœsch's avatar Clément Bœsch

Merge commit '370ddc7b'

* commit '370ddc7b':
  h264: remove H264Context.pict_type
Merged-by: 's avatarClément Bœsch <clement@stupeflix.com>
parents 0ab18163 370ddc7b
...@@ -491,8 +491,6 @@ static void decode_postinit(H264Context *h, int setup_finished) ...@@ -491,8 +491,6 @@ static void decode_postinit(H264Context *h, int setup_finished)
H264Picture *cur = h->cur_pic_ptr; H264Picture *cur = h->cur_pic_ptr;
int i, pics, out_of_order, out_idx; int i, pics, out_of_order, out_idx;
h->cur_pic_ptr->f->pict_type = h->pict_type;
if (h->next_output_pic) if (h->next_output_pic)
return; return;
......
...@@ -627,8 +627,6 @@ typedef struct H264Context { ...@@ -627,8 +627,6 @@ typedef struct H264Context {
*/ */
int single_decode_warning; int single_decode_warning;
enum AVPictureType pict_type;
/** @} */ /** @} */
/** /**
......
...@@ -499,6 +499,8 @@ static int h264_frame_start(H264Context *h) ...@@ -499,6 +499,8 @@ static int h264_frame_start(H264Context *h)
pic->invalid_gap = 0; pic->invalid_gap = 0;
pic->sei_recovery_frame_cnt = h->sei.recovery_point.recovery_frame_cnt; pic->sei_recovery_frame_cnt = h->sei.recovery_point.recovery_frame_cnt;
pic->f->pict_type = h->slice_ctx[0].slice_type;
if ((ret = alloc_picture(h, pic)) < 0) if ((ret = alloc_picture(h, pic)) < 0)
return ret; return ret;
if(!h->frame_recovered && !h->avctx->hwaccel if(!h->frame_recovered && !h->avctx->hwaccel
...@@ -1140,10 +1142,6 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl) ...@@ -1140,10 +1142,6 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
} }
} }
// to make a few old functions happy, it's wrong though
if (!h->setup_finished)
h->pict_type = sl->slice_type;
pps_id = get_ue_golomb(&sl->gb); pps_id = get_ue_golomb(&sl->gb);
if (pps_id >= MAX_PPS_COUNT) { if (pps_id >= MAX_PPS_COUNT) {
av_log(h->avctx, AV_LOG_ERROR, "pps_id %u out of range\n", pps_id); av_log(h->avctx, AV_LOG_ERROR, "pps_id %u out of range\n", pps_id);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment