diff options
author | girish bale <girish.bale@amd.com> | 2018-09-04 12:28:01 +0530 |
---|---|---|
committer | Leo Liu <leo.liu@amd.com> | 2018-09-11 11:21:34 -0400 |
commit | 5c4bff4a433dff1c5d005edfceaf727b6214bb74 (patch) | |
tree | 777d4a3a2afa43175beefd73895a3e50f242e195 | |
parent | b0a03765a183d6d4633d7e71f46797f91a3c0951 (diff) |
Tunneled Pipeline Hang Fix:Fix for Tunneled Pipeline Hang
This will fix the hang during tunneled pipeline
omxh264dec->omxh264enc with ffmpeg transcoded file.
For proper tunnel setup, decoder is configured first
prior to encoder.
-rw-r--r-- | omx/gstomxvideoenc.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/omx/gstomxvideoenc.c b/omx/gstomxvideoenc.c index e0b6802..2f5a7ca 100644 --- a/omx/gstomxvideoenc.c +++ b/omx/gstomxvideoenc.c @@ -1320,10 +1320,23 @@ gst_omx_video_enc_set_format (GstVideoEncoder * encoder, OMX_PARAM_PORTDEFINITIONTYPE port_def; GstVideoInfo *info = &state->info; GList *negotiation_map = NULL, *l; + GstPad *peer; + GstElement *element; self = GST_OMX_VIDEO_ENC (encoder); klass = GST_OMX_VIDEO_ENC_GET_CLASS (encoder); + /* For Tunneled Pipeline(Dec->Enc),we need to make sure decoder has already configured. */ + peer = gst_pad_get_peer (GST_VIDEO_ENCODER_SINK_PAD (self)); + element = peer ? gst_pad_get_parent_element (peer) : NULL; + if (element && GST_IS_OMX_VIDEO_DEC (element)) { + GstOMXVideoDec *dec = GST_OMX_VIDEO_DEC (element); + if(dec->dec_out_port->tunneled == NULL) { + GST_ERROR_OBJECT (self, "Tunnelled component Decoder has not yet set its configuration"); + return FALSE; + } + } + GST_DEBUG_OBJECT (self, "Setting new format %s", gst_video_format_to_string (info->finfo->format)); |