mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
omxvideodec: Try harder to deallocate the buffers after errors happened
This commit is contained in:
parent
ae7ed44e6b
commit
87587dd6d2
1 changed files with 8 additions and 3 deletions
|
@ -272,11 +272,16 @@ gst_omx_video_dec_open (GstOMXVideoDec * self)
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_omx_video_dec_close (GstOMXVideoDec * self)
|
gst_omx_video_dec_close (GstOMXVideoDec * self)
|
||||||
{
|
{
|
||||||
if (gst_omx_component_get_state (self->component, 0) > OMX_StateLoaded) {
|
OMX_STATETYPE state;
|
||||||
gst_omx_component_set_state (self->component, OMX_StateLoaded);
|
|
||||||
|
state = gst_omx_component_get_state (self->component, 0);
|
||||||
|
if (state > OMX_StateLoaded || state == OMX_StateInvalid) {
|
||||||
|
if (state > OMX_StateLoaded)
|
||||||
|
gst_omx_component_set_state (self->component, OMX_StateLoaded);
|
||||||
gst_omx_port_deallocate_buffers (self->in_port);
|
gst_omx_port_deallocate_buffers (self->in_port);
|
||||||
gst_omx_port_deallocate_buffers (self->out_port);
|
gst_omx_port_deallocate_buffers (self->out_port);
|
||||||
gst_omx_component_get_state (self->component, 5 * GST_SECOND);
|
if (state > OMX_StateLoaded)
|
||||||
|
gst_omx_component_get_state (self->component, 5 * GST_SECOND);
|
||||||
}
|
}
|
||||||
|
|
||||||
self->in_port = NULL;
|
self->in_port = NULL;
|
||||||
|
|
Loading…
Reference in a new issue