rpicamsrc: Destroy mmal pool on shutdown always.

Avoid hangs on the next run because we didn't clean up the mmal pool
last time we shutdown.
This commit is contained in:
Jan Schmidt 2016-10-08 11:10:30 +00:00 committed by Tim-Philipp Müller
parent f42afec471
commit dd9d7341b0

View file

@ -1561,13 +1561,14 @@ static void destroy_encoder_component(RASPIVID_STATE *state)
}
}
// Get rid of any port buffers first
if (state->encoder_pool)
{
mmal_port_pool_destroy(state->encoder_output_port, state->encoder_pool);
state->encoder_pool = NULL;
}
if (state->encoder_component) {
// Get rid of any port buffers first
if (state->encoder_pool)
{
mmal_port_pool_destroy(state->encoder_component->output[0], state->encoder_pool);
state->encoder_pool = NULL;
}
mmal_component_destroy(state->encoder_component);
state->encoder_component = NULL;