mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
omxvideodec: Disable output port when setting a new format
Based on a patch by Josep Torra <n770galaxy@gmail.com>
This commit is contained in:
parent
65174bbd7f
commit
00be69f4a0
1 changed files with 10 additions and 4 deletions
|
@ -2025,14 +2025,24 @@ gst_omx_video_dec_set_format (GstVideoDecoder * decoder,
|
|||
} else {
|
||||
if (gst_omx_port_set_enabled (self->dec_in_port, FALSE) != OMX_ErrorNone)
|
||||
return FALSE;
|
||||
if (gst_omx_port_set_enabled (self->dec_out_port, FALSE) != OMX_ErrorNone)
|
||||
return FALSE;
|
||||
if (gst_omx_port_wait_buffers_released (self->dec_in_port,
|
||||
5 * GST_SECOND) != OMX_ErrorNone)
|
||||
return FALSE;
|
||||
if (gst_omx_port_wait_buffers_released (self->dec_out_port,
|
||||
1 * GST_SECOND) != OMX_ErrorNone)
|
||||
return FALSE;
|
||||
if (gst_omx_port_deallocate_buffers (self->dec_in_port) != OMX_ErrorNone)
|
||||
return FALSE;
|
||||
if (gst_omx_port_deallocate_buffers (self->dec_out_port) != OMX_ErrorNone)
|
||||
return FALSE;
|
||||
if (gst_omx_port_wait_enabled (self->dec_in_port,
|
||||
1 * GST_SECOND) != OMX_ErrorNone)
|
||||
return FALSE;
|
||||
if (gst_omx_port_wait_enabled (self->dec_out_port,
|
||||
1 * GST_SECOND) != OMX_ErrorNone)
|
||||
return FALSE;
|
||||
}
|
||||
if (self->input_state)
|
||||
gst_video_codec_state_unref (self->input_state);
|
||||
|
@ -2124,10 +2134,6 @@ gst_omx_video_dec_set_format (GstVideoDecoder * decoder,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (!needs_disable)
|
||||
if (gst_omx_port_populate (self->dec_out_port) != OMX_ErrorNone)
|
||||
return FALSE;
|
||||
|
||||
/* Start the srcpad loop again */
|
||||
GST_DEBUG_OBJECT (self, "Starting task again");
|
||||
|
||||
|
|
Loading…
Reference in a new issue