summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororestisf <orestisf1993@gmail.com>2017-07-25 22:54:30 +0300
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2017-08-03 17:07:14 +0200
commitac9ddc5e8daa9e48a48dd56fdaef869f1f8cc65c (patch)
treea2fb5729c55920a1a1e2663460e084ecf3293f20
parent66703a7835e4177c93d46728eda63226e8be4d19 (diff)
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
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_h264.c7
1 files 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);