From 1ed9128c99723ea202ba7614ca4f9c563b7ad846 Mon Sep 17 00:00:00 2001 From: Sreerenj Balachandran Date: Tue, 27 May 2014 05:18:05 -0600 Subject: Fix the segfault while inserting packed slice header Signed-off-by: Sreerenj Balachandran Reviewed-by: Zhao, Yakui (cherry picked from commit 7c2273f1334d7d45e248d128e17200b7e8beffd1) --- src/gen6_mfc_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gen6_mfc_common.c b/src/gen6_mfc_common.c index e500feb..77c46dd 100644 --- a/src/gen6_mfc_common.c +++ b/src/gen6_mfc_common.c @@ -1593,10 +1593,10 @@ void intel_avc_slice_insert_packed_data(VADriverContextP ctx, } else { unsigned int skip_emul_byte_cnt; - header_data = (unsigned int *)encode_state->packed_header_data_ext[start_index + i]->buffer; + header_data = (unsigned int *)encode_state->packed_header_data_ext[slice_header_index]->buffer; param = (VAEncPackedHeaderParameterBuffer *) - (encode_state->packed_header_params_ext[start_index + i]->buffer); + (encode_state->packed_header_params_ext[slice_header_index]->buffer); length_in_bits = param->bit_length; /* as the slice header is the last header data for one slice, -- cgit v1.2.3