summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjitendra <jvarshney20@gmail.com>2013-04-16 14:50:49 +0530
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2013-04-16 12:46:48 +0200
commit960590f92ff6535565226dfab6fd52082dd6ee2c (patch)
tree452928306f0a966620d04a5361cd4665958a462d
parentc3ca9658a04cef2c5c2b0b0e4b028186c134ffa3 (diff)
omx: Disable output port before transition to idle state
https://bugzilla.gnome.org/show_bug.cgi?id=698109
-rw-r--r--omx/gstomxaudioenc.c14
-rw-r--r--omx/gstomxvideodec.c14
-rw-r--r--omx/gstomxvideoenc.c14
3 files changed, 21 insertions, 21 deletions
diff --git a/omx/gstomxaudioenc.c b/omx/gstomxaudioenc.c
index 1956655..6866eeb 100644
--- a/omx/gstomxaudioenc.c
+++ b/omx/gstomxaudioenc.c
@@ -781,19 +781,19 @@ gst_omx_audio_enc_set_format (GstAudioEncoder * encoder, GstAudioInfo * info)
if (gst_omx_port_mark_reconfigured (self->enc_in_port) != OMX_ErrorNone)
return FALSE;
} else {
- if (gst_omx_component_set_state (self->enc, OMX_StateIdle) != OMX_ErrorNone)
+ /* Disable output port */
+ if (gst_omx_port_set_enabled (self->enc_out_port, FALSE) != OMX_ErrorNone)
return FALSE;
- /* Need to allocate buffers to reach Idle state */
- if (gst_omx_port_allocate_buffers (self->enc_in_port) != OMX_ErrorNone)
+ if (gst_omx_port_wait_enabled (self->enc_out_port,
+ 1 * GST_SECOND) != OMX_ErrorNone)
return FALSE;
- /* And disable output port */
- if (gst_omx_port_set_enabled (self->enc_out_port, FALSE) != OMX_ErrorNone)
+ if (gst_omx_component_set_state (self->enc, OMX_StateIdle) != OMX_ErrorNone)
return FALSE;
- if (gst_omx_port_wait_enabled (self->enc_out_port,
- 1 * GST_SECOND) != OMX_ErrorNone)
+ /* Need to allocate buffers to reach Idle state */
+ if (gst_omx_port_allocate_buffers (self->enc_in_port) != OMX_ErrorNone)
return FALSE;
if (gst_omx_component_get_state (self->enc,
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
index f815f11..cd0ac13 100644
--- a/omx/gstomxvideodec.c
+++ b/omx/gstomxvideodec.c
@@ -2660,19 +2660,19 @@ gst_omx_video_dec_set_format (GstVideoDecoder * decoder,
if (!gst_omx_video_dec_negotiate (self))
GST_LOG_OBJECT (self, "Negotiation failed, will get output format later");
- if (gst_omx_component_set_state (self->dec, OMX_StateIdle) != OMX_ErrorNone)
+ /* Disable output port */
+ if (gst_omx_port_set_enabled (self->dec_out_port, FALSE) != OMX_ErrorNone)
return FALSE;
- /* Need to allocate buffers to reach Idle state */
- if (gst_omx_port_allocate_buffers (self->dec_in_port) != OMX_ErrorNone)
+ if (gst_omx_port_wait_enabled (self->dec_out_port,
+ 1 * GST_SECOND) != OMX_ErrorNone)
return FALSE;
- /* And disable output port */
- if (gst_omx_port_set_enabled (self->dec_out_port, FALSE) != OMX_ErrorNone)
+ if (gst_omx_component_set_state (self->dec, OMX_StateIdle) != OMX_ErrorNone)
return FALSE;
- if (gst_omx_port_wait_enabled (self->dec_out_port,
- 1 * GST_SECOND) != OMX_ErrorNone)
+ /* Need to allocate buffers to reach Idle state */
+ if (gst_omx_port_allocate_buffers (self->dec_in_port) != OMX_ErrorNone)
return FALSE;
if (gst_omx_component_get_state (self->dec,
diff --git a/omx/gstomxvideoenc.c b/omx/gstomxvideoenc.c
index 6eaedfa..0e8bcb6 100644
--- a/omx/gstomxvideoenc.c
+++ b/omx/gstomxvideoenc.c
@@ -1256,19 +1256,19 @@ gst_omx_video_enc_set_format (GstVideoEncoder * encoder,
if (gst_omx_port_mark_reconfigured (self->enc_in_port) != OMX_ErrorNone)
return FALSE;
} else {
- if (gst_omx_component_set_state (self->enc, OMX_StateIdle) != OMX_ErrorNone)
+ /* Disable output port */
+ if (gst_omx_port_set_enabled (self->enc_out_port, FALSE) != OMX_ErrorNone)
return FALSE;
- /* Need to allocate buffers to reach Idle state */
- if (gst_omx_port_allocate_buffers (self->enc_in_port) != OMX_ErrorNone)
+ if (gst_omx_port_wait_enabled (self->enc_out_port,
+ 1 * GST_SECOND) != OMX_ErrorNone)
return FALSE;
- /* And disable output port */
- if (gst_omx_port_set_enabled (self->enc_out_port, FALSE) != OMX_ErrorNone)
+ if (gst_omx_component_set_state (self->enc, OMX_StateIdle) != OMX_ErrorNone)
return FALSE;
- if (gst_omx_port_wait_enabled (self->enc_out_port,
- 1 * GST_SECOND) != OMX_ErrorNone)
+ /* Need to allocate buffers to reach Idle state */
+ if (gst_omx_port_allocate_buffers (self->enc_in_port) != OMX_ErrorNone)
return FALSE;
if (gst_omx_component_get_state (self->enc,