From b57de0d2f5ec20c16efdac8c6d1ea7c529e01187 Mon Sep 17 00:00:00 2001 From: Li Xiaowei Date: Thu, 7 Mar 2013 11:32:20 +0800 Subject: [PATCH] H264: MVC: Fix the slice data offset when MVC NAL presents When MVC slice NAL(ext slice and prefix NAL) present, the NAL header bytes sum is three, not one byte as usual. Signed-off-by: Li Xiaowei --- gst-libs/gst/vaapi/gstvaapidecoder_h264.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c index 89c3efd..ac2b5ce 100755 --- a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c @@ -2828,7 +2828,7 @@ get_slice_data_bit_offset(GstH264SliceHdr *slice_hdr, GstH264NalUnit *nalu) guint epb_count; epb_count = slice_hdr->n_emulation_prevention_bytes; - return 8 /* nal_unit_type */ + slice_hdr->header_size - epb_count * 8; + return 8 * slice_hdr->nal_header_bytes + slice_hdr->header_size - epb_count * 8; } static gboolean -- 2.7.4