diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2018-05-28 15:02:13 +0200 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2018-06-08 09:38:57 +0200 |
commit | 338ff34e5ea5527475d7e56d71f13a422ad31620 (patch) | |
tree | d666ca46e4532e8e7fa83ea028aea2fa13049517 /omx | |
parent | 3498f81d1f40fbda563863f2fc41d20e85c15907 (diff) | |
download | gst-omx-338ff34e5ea5527475d7e56d71f13a422ad31620.tar.gz |
omxvidee{enc,dec}: refresh input port definition after setting format
Setting the input format and the associated encoder/decoder settings
may also affect the nBufferCountMin of the input port.
Refresh the input port so we'll use up to date values in propose/decide
allocation.
https://bugzilla.gnome.org/show_bug.cgi?id=796445
Diffstat (limited to 'omx')
-rw-r--r-- | omx/gstomxvideodec.c | 5 | ||||
-rw-r--r-- | omx/gstomxvideoenc.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c index 29b8fce..1d94cce 100644 --- a/omx/gstomxvideodec.c +++ b/omx/gstomxvideodec.c @@ -2597,10 +2597,13 @@ gst_omx_video_dec_set_format (GstVideoDecoder * decoder, } } - GST_DEBUG_OBJECT (self, "Updating outport port definition"); + GST_DEBUG_OBJECT (self, "Updating ports definition"); if (gst_omx_port_update_port_definition (self->dec_out_port, NULL) != OMX_ErrorNone) return FALSE; + if (gst_omx_port_update_port_definition (self->dec_in_port, + NULL) != OMX_ErrorNone) + return FALSE; gst_buffer_replace (&self->codec_data, state->codec_data); self->input_state = gst_video_codec_state_ref (state); diff --git a/omx/gstomxvideoenc.c b/omx/gstomxvideoenc.c index 20e5108..8a0ed3f 100644 --- a/omx/gstomxvideoenc.c +++ b/omx/gstomxvideoenc.c @@ -2224,10 +2224,13 @@ gst_omx_video_enc_set_format (GstVideoEncoder * encoder, } } - GST_DEBUG_OBJECT (self, "Updating outport port definition"); + GST_DEBUG_OBJECT (self, "Updating ports definition"); if (gst_omx_port_update_port_definition (self->enc_out_port, NULL) != OMX_ErrorNone) return FALSE; + if (gst_omx_port_update_port_definition (self->enc_in_port, + NULL) != OMX_ErrorNone) + return FALSE; /* Some OMX implementations reset the bitrate after setting the compression * format, see bgo#698049, so re-set it */ |