Fix some crashers

This commit is contained in:
Wim Taymans 2017-03-13 11:43:34 +01:00
parent 6e4a7c779a
commit 9b93fd396a
3 changed files with 7 additions and 3 deletions

View file

@ -901,10 +901,8 @@ gst_pinos_sink_change_state (GstElement * element, GstStateChange transition)
case GST_STATE_CHANGE_PLAYING_TO_PAUSED: case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
break; break;
case GST_STATE_CHANGE_PAUSED_TO_READY: case GST_STATE_CHANGE_PAUSED_TO_READY:
g_hash_table_remove_all (this->buf_ids);
break; break;
case GST_STATE_CHANGE_READY_TO_NULL: case GST_STATE_CHANGE_READY_TO_NULL:
g_hash_table_remove_all (this->buf_ids);
gst_pinos_sink_close (this); gst_pinos_sink_close (this);
break; break;
default: default:

View file

@ -219,7 +219,7 @@ try_link_port (PinosNode *node,
error: error:
{ {
pinos_log_error ("module %p: can't link node '%s'", impl, error); pinos_log_error ("module %p: can't link node '%s'", impl, error);
if (info->info->client) { if (info->info->client && info->info->client->core_resource) {
pinos_core_notify_error (info->info->client->core_resource, pinos_core_notify_error (info->info->client->core_resource,
info->resource->id, info->resource->id,
SPA_RESULT_ERROR, SPA_RESULT_ERROR,

View file

@ -302,8 +302,14 @@ on_node_event (SpaNode *node, SpaNodeEvent *event, void *user_data)
processed = true; processed = true;
pi->buffer_id = po->buffer_id; pi->buffer_id = po->buffer_id;
if ((res = spa_node_port_reuse_buffer (outport->node->node,
outport->port_id,
po->buffer_id)) < 0)
pinos_log_warn ("node %p: error reuse buffer: %d", outport->node, res);
po->buffer_id = SPA_ID_INVALID; po->buffer_id = SPA_ID_INVALID;
} }
if ((res = spa_node_process_output (outport->node->node)) < 0) if ((res = spa_node_process_output (outport->node->node)) < 0)
pinos_log_warn ("node %p: got process output %d", outport->node, res); pinos_log_warn ("node %p: got process output %d", outport->node, res);
} }