From 8e0dc1d89d56e4b331748c0375de50c614cb0749 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 3 Jul 2017 10:54:50 +0200 Subject: [PATCH] omxh264enc: raise a warning if AVCIntraPeriod is not supported Some platforms may not implement OMX_IndexConfigVideoAVCIntraPeriod and use OMX_IndexParamVideoAvc instead to configure the GOP pattern. So raise a warning instead of an error if this API is not implemented. https://bugzilla.gnome.org/show_bug.cgi?id=784379 --- omx/gstomxh264enc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/omx/gstomxh264enc.c b/omx/gstomxh264enc.c index 7f202a53eb..13acdcb5fa 100644 --- a/omx/gstomxh264enc.c +++ b/omx/gstomxh264enc.c @@ -434,7 +434,11 @@ set_avc_intra_period (GstOMXH264Enc * self) err = gst_omx_component_get_parameter (GST_OMX_VIDEO_ENC (self)->enc, OMX_IndexConfigVideoAVCIntraPeriod, &config_avcintraperiod); - if (err != OMX_ErrorNone) { + if (err == OMX_ErrorUnsupportedIndex) { + GST_WARNING_OBJECT (self, + "OMX_IndexConfigVideoAVCIntraPeriod not supported by component"); + return TRUE; + } else if (err != OMX_ErrorNone) { GST_ERROR_OBJECT (self, "can't get OMX_IndexConfigVideoAVCIntraPeriod %s (0x%08x)", gst_omx_error_to_string (err), err);