diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2017-11-29 14:18:41 +0100 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2017-11-29 12:41:37 -0500 |
commit | 56654cced50c369d0b84fb0215f11e0d314b8ced (patch) | |
tree | 5051630903ca3f36462ba46bceb0db9fd0783f6e | |
parent | 63644639180aa180df293ab4471367bb034660bc (diff) | |
download | gst-omx-56654cced50c369d0b84fb0215f11e0d314b8ced.tar.gz |
omxvideodec: retrieve OMX_IndexParamVideoPortFormat before setting it
The usual pattern when setting OMX params is to first get the struct
param, override the values we want to set and then set the updated
param.
We were not doing this with OMX_IndexParamVideoPortFormat and so were
resetting some fields such as OMX_VIDEO_PARAM_PORTFORMATTYPE.xFramerate
https://bugzilla.gnome.org/show_bug.cgi?id=790979
-rw-r--r-- | omx/gstomxvideodec.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c index 6d5db9a..38b4c1b 100644 --- a/omx/gstomxvideodec.c +++ b/omx/gstomxvideodec.c @@ -1957,6 +1957,14 @@ gst_omx_video_dec_negotiate (GstOMXVideoDec * self) GST_OMX_INIT_STRUCT (¶m); param.nPortIndex = self->dec_out_port->index; + err = gst_omx_component_get_parameter (self->dec, + OMX_IndexParamVideoPortFormat, ¶m); + if (err != OMX_ErrorNone) { + GST_ERROR_OBJECT (self, "Failed to get video port format: %s (0x%08x)", + gst_omx_error_to_string (err), err); + return FALSE; + } + for (l = negotiation_map; l; l = l->next) { GstOMXVideoNegotiationMap *m = l->data; |