From ac9ddc5e8daa9e48a48dd56fdaef869f1f8cc65c Mon Sep 17 00:00:00 2001 From: orestisf Date: Tue, 25 Jul 2017 22:54:30 +0300 Subject: libs: decoder: h264: decode MVC base view only If processed SPS has mvc profile and the configuration is set to base-only, the frame is drop. https://bugzilla.gnome.org/show_bug.cgi?id=732265 --- gst-libs/gst/vaapi/gstvaapidecoder_h264.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c index c5c5fddc..c7885e4b 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c @@ -4050,10 +4050,9 @@ decode_picture (GstVaapiDecoderH264 * decoder, GstVaapiDecoderUnit * unit) g_return_val_if_fail (sps != NULL, GST_VAAPI_DECODER_STATUS_ERROR_UNKNOWN); /* Only decode base stream for MVC */ - switch (sps->profile_idc) { - case GST_H264_PROFILE_MULTIVIEW_HIGH: - case GST_H264_PROFILE_STEREO_HIGH: - break; + if (priv->base_only && is_mvc_profile (sps->profile_idc)) { + GST_DEBUG ("multiview sequence but base-only is set: dropping frame"); + return (GstVaapiDecoderStatus) GST_VAAPI_DECODER_STATUS_DROP_FRAME; } status = ensure_context (decoder, sps); -- cgit v1.2.3