From 56febc993b928ccc039a32158ca60b234c311875 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 17 Jan 2015 22:28:46 +0100 Subject: h264: move the slice type variables into the per-slice context --- libavcodec/h264_parser.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libavcodec/h264_parser.c') diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 672411e7b8..f5dcc52b8f 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -104,15 +104,15 @@ static int scan_mmco_reset(AVCodecParserContext *s) H264Context *h = &p->h; H264SliceContext *sl = &h->slice_ctx[0]; - h->slice_type_nos = s->pict_type & 3; + sl->slice_type_nos = s->pict_type & 3; if (h->pps.redundant_pic_cnt_present) get_ue_golomb(&h->gb); // redundant_pic_count - if (ff_set_ref_count(h) < 0) + if (ff_set_ref_count(h, sl) < 0) return AVERROR_INVALIDDATA; - if (h->slice_type_nos != AV_PICTURE_TYPE_I) { + if (sl->slice_type_nos != AV_PICTURE_TYPE_I) { int list; for (list = 0; list < h->list_count; list++) { if (get_bits1(&h->gb)) { @@ -140,8 +140,8 @@ static int scan_mmco_reset(AVCodecParserContext *s) } } - if ((h->pps.weighted_pred && h->slice_type_nos == AV_PICTURE_TYPE_P) || - (h->pps.weighted_bipred_idc == 1 && h->slice_type_nos == AV_PICTURE_TYPE_B)) + if ((h->pps.weighted_pred && sl->slice_type_nos == AV_PICTURE_TYPE_P) || + (h->pps.weighted_bipred_idc == 1 && sl->slice_type_nos == AV_PICTURE_TYPE_B)) ff_pred_weight_table(h, sl); if (get_bits1(&h->gb)) { // adaptive_ref_pic_marking_mode_flag -- cgit v1.2.3