summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo Liu <leo.liu@amd.com>2015-11-02 15:17:00 -0500
committerLeo Liu <leo.liu@amd.com>2015-11-02 15:51:09 -0500
commit85afb6ee4298a8afcd9345b7b12b1db990dbca36 (patch)
treeec1c6d195cae55c5286ef8c9de7744afe47cb15f
parent90a062ee91a38bd0a4227b793e4592bbffe6fb48 (diff)
gstomxvideodec: fix tunnel setup issue due to the change in
gstvideoenc base driver From gstreamer/gst-plugins-base, there is a patch, which got in tag 1.5.1, "videoencoder: Don't delay set_format This prevent implementing allocation query, as the format need to be known in order to determin the size and number of buffers needed. Note: This may lead to few regressions that will need fixing commit ce50fc221e8a795d7cfedf471d239d4a9d3bf824 (patch)" When transcoding with tunnel, We will see the deadlock with gstreamer version 1.5.1 and after. The problem is gstvideoenc calling the set_format earlier than before, so when the gst_omx_video_enc_set_format in gstomx is called, the tunnel has not been setup, the process get into deadlock. Move the tunnel setup into gst_omx_video_dec_set_format to adapt the base driver changes. Signed-off-by: Leo Liu <leo.liu@amd.com>
-rw-r--r--omx/gstomxvideodec.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
index 00f3951..07102a2 100644
--- a/omx/gstomxvideodec.c
+++ b/omx/gstomxvideodec.c
@@ -1781,19 +1781,6 @@ gst_omx_video_dec_reconfigure_output_port (GstOMXVideoDec * self)
GST_VIDEO_DECODER_STREAM_UNLOCK (self);
- {
- GstPad *peer = gst_pad_get_peer (GST_VIDEO_DECODER_SRC_PAD (self));
- GstElement *element = peer ? gst_pad_get_parent_element (peer) : NULL;
-
- if (element && GST_IS_OMX_VIDEO_ENC (element)) {
- GstOMXVideoEnc *enc = GST_OMX_VIDEO_ENC (element);
-
- gst_omx_component_setup_tunnel (self->dec, self->dec_out_port,
- enc->enc, enc->enc_in_port);
-
- }
- }
-
#if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_EGL)
enable_port:
#endif
@@ -2681,6 +2668,19 @@ gst_omx_video_dec_set_format (GstVideoDecoder * decoder,
return FALSE;
}
+ {
+ GstPad *peer = gst_pad_get_peer (GST_VIDEO_DECODER_SRC_PAD (self));
+ GstElement *element = peer ? gst_pad_get_parent_element (peer) : NULL;
+
+ if (element && GST_IS_OMX_VIDEO_ENC (element)) {
+ GstOMXVideoEnc *enc = GST_OMX_VIDEO_ENC (element);
+
+ gst_omx_component_setup_tunnel (self->dec, self->dec_out_port,
+ enc->enc, enc->enc_in_port);
+
+ }
+ }
+
/* Start the srcpad loop again */
GST_DEBUG_OBJECT (self, "Starting task again");