summaryrefslogtreecommitdiff
path: root/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2015-06-02 11:46:00 +0200
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2015-06-02 11:50:56 +0200
commitd2791a7844b83bb0bad40784541aa57403214f6e (patch)
tree4d8ae455a02ed472ac070ff02594de7866e1d061 /gst-libs/gst/vaapi/gstvaapidecoder_h264.c
parent2492afa86c0795b1902ab5ead375064bcec32c93 (diff)
downloadgst-vaapi-d2791a7844b83bb0bad40784541aa57403214f6e.tar.gz
decoder: h264: fix uninitialized variables in avcC mode.
Fix uninitialized variables when decoding SPS and PPS NAL units from "codec-data" buffers. This is particularly important when seeking ops are involved, and the new persistent states are used more often. https://bugzilla.gnome.org/show_bug.cgi?id=750094
Diffstat (limited to 'gst-libs/gst/vaapi/gstvaapidecoder_h264.c')
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_h264.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
index 20d96cee..677e73b7 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
@@ -4285,6 +4285,9 @@ gst_vaapi_decoder_h264_decode_codec_data(GstVaapiDecoder *base_decoder,
goto cleanup;
ofs = pi->nalu.offset + pi->nalu.size;
+ pi->state = priv->parser_state;
+ pi->flags = 0;
+
status = decode_sps(decoder, &unit);
if (status != GST_VAAPI_DECODER_STATUS_SUCCESS)
goto cleanup;
@@ -4315,6 +4318,9 @@ gst_vaapi_decoder_h264_decode_codec_data(GstVaapiDecoder *base_decoder,
goto cleanup;
ofs = pi->nalu.offset + pi->nalu.size;
+ pi->state = priv->parser_state;
+ pi->flags = 0;
+
status = decode_pps(decoder, &unit);
if (status != GST_VAAPI_DECODER_STATUS_SUCCESS)
goto cleanup;