From: Jan Schmidt Date: Sat, 8 Oct 2016 11:10:30 +0000 (+0000) Subject: rpicamsrc: Destroy mmal pool on shutdown always. X-Git-Tag: 1.19.3~509^2~493^2~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dd9d7341b0f8120d9bb3862d195a95b5b0834ae2;p=platform%2Fupstream%2Fgstreamer.git 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. --- diff --git a/sys/rpicamsrc/RaspiCapture.c b/sys/rpicamsrc/RaspiCapture.c index b3608ca..8065e70 100644 --- a/sys/rpicamsrc/RaspiCapture.c +++ b/sys/rpicamsrc/RaspiCapture.c @@ -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;