From 3a6f6f97ab956709d2dfa1b12ea221ecabdcb1ce Mon Sep 17 00:00:00 2001 From: Zhong Cong Date: Tue, 4 Jun 2013 15:01:46 +0800 Subject: [PATCH] decoder: h264: skip SPS extension and auxiliary slice NALs. When NAL units of type 13 (SPS extension) or type 19 (auxiliary slice) are present in a video, decoders shall perform the (optional) decoding process specified for these NAL units or shall ignore them (7.4.1). Implement option 2 (skip) for now, as alpha composition is not supported yet during the decoding process. This fixes decoding of the primary coded video in alphaconformanceG. https://bugzilla.gnome.org/show_bug.cgi?id=703928 https://bugzilla.gnome.org/show_bug.cgi?id=728869 https://bugzilla.gnome.org/show_bug.cgi?id=724518 [skip NAL units earlier, i.e. at parsing time] Signed-off-by: Gwenole Beauchesne --- ext/codecparsers | 2 +- gst-libs/gst/vaapi/gstvaapidecoder_h264.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ext/codecparsers b/ext/codecparsers index a454f86..7eb3458 160000 --- a/ext/codecparsers +++ b/ext/codecparsers @@ -1 +1 @@ -Subproject commit a454f860186efe61c874cc938aecd7818d2935d1 +Subproject commit 7eb3458a1629bf9d959b0957ffe4363a258fe86f diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c index 368eed8..c238061 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c @@ -3166,6 +3166,11 @@ gst_vaapi_decoder_h264_parse(GstVaapiDecoder *base_decoder, flags |= GST_VAAPI_DECODER_UNIT_FLAG_FRAME_START; gst_vaapi_parser_info_h264_replace(&priv->prev_slice_pi, pi); break; + case GST_H264_NAL_SPS_EXT: + case GST_H264_NAL_SLICE_AUX: + /* skip SPS extension and auxiliary slice for now */ + flags |= GST_VAAPI_DECODER_UNIT_FLAG_SKIP; + break; default: if (pi->nalu.type >= 14 && pi->nalu.type <= 18) flags |= GST_VAAPI_DECODER_UNIT_FLAG_FRAME_START; -- 2.7.4