[Libva] [PATCH] Fix the segfault while inserting packed slice header

sreerenj.balachandran at intel.com sreerenj.balachandran at intel.com
Tue May 27 04:18:05 PDT 2014


From: Sreerenj Balachandran <sreerenj.balachandran at intel.com>

---
 src/gen6_mfc_common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gen6_mfc_common.c b/src/gen6_mfc_common.c
index 936b4ef..bf15865 100644
--- a/src/gen6_mfc_common.c
+++ b/src/gen6_mfc_common.c
@@ -1578,10 +1578,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,
-- 
1.9.1



More information about the Libva mailing list