decoder: h264: cope with new gst_h264_parser_parse_sei() interface.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Fri, 21 Mar 2014 14:15:37 +0000 (15:15 +0100)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Fri, 18 Apr 2014 17:37:16 +0000 (19:37 +0200)
The gst_h264_parse_parse_sei() function now returns an array of SEI
messages, instead of a single SEI message. Reason: it is allowed to
have several SEI messages packed into a single SEI NAL unit, instead
of multiple NAL units.

gst-libs/gst/vaapi/gstvaapidecoder_h264.c

index ba38d54..69bef66 100644 (file)
@@ -1056,18 +1056,19 @@ parse_sei(GstVaapiDecoderH264 *decoder, GstVaapiDecoderUnit *unit)
 {
     GstVaapiDecoderH264Private * const priv = &decoder->priv;
     GstVaapiParserInfoH264 * const pi = unit->parsed_info;
-    GstH264SEIMessage sei;
+    GArray *sei_messages = NULL;
     GstH264ParserResult result;
 
     GST_DEBUG("parse SEI");
 
-    memset(&sei, 0, sizeof(sei));
-    result = gst_h264_parser_parse_sei(priv->parser, &pi->nalu, &sei);
+    result = gst_h264_parser_parse_sei(priv->parser, &pi->nalu, &sei_messages);
     if (result != GST_H264_PARSER_OK) {
-        GST_WARNING("failed to parse SEI, payload type:%d", sei.payloadType);
+        GST_WARNING("failed to parse SEI messages");
+        g_array_unref(sei_messages);
         return get_status(result);
     }
 
+    g_array_unref(sei_messages);
     return GST_VAAPI_DECODER_STATUS_SUCCESS;
 }