From 098eb2624ec6c32d9afa5a5054ca84fce90bf2e8 Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Tue, 18 Dec 2012 14:57:36 +0100 Subject: [PATCH] h264: optimize initialization process of decoder units. Decoder units were zero-initialized, including the SPS/PPS/slice headers. The latter don't require zero-initialization since the codecparsers/ lib will do so for key variables already. This is not a great value per se but at least it makes it possible to check whether the default initialization decisions made in the codecparsers/ lib were right or not. This can be reverted if this exposes too many issues. --- gst-libs/gst/vaapi/gstvaapidecoder_h264.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c index e85cb67852..e601bdcc60 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c @@ -74,11 +74,11 @@ gst_vaapi_decoder_unit_h264_new(guint size) }; unit = (GstVaapiDecoderUnitH264 *) - gst_vaapi_mini_object_new0(&GstVaapiDecoderUnitH264Class); + gst_vaapi_mini_object_new(&GstVaapiDecoderUnitH264Class); if (!unit) return NULL; - unit->base.size = size; + gst_vaapi_decoder_unit_init(&unit->base, size); return unit; }