Skip to content
Snippets Groups Projects
Commit d0fc525c authored by Mangal Kushwah's avatar Mangal Kushwah Committed by Steve Lhomme
Browse files

mediacodec: free format returned by getOutputFormat

parent 55e0779f
No related branches found
No related tags found
1 merge request!6041mediacodec: free format returned by getOutputFormat
Pipeline #516032 passed with stages
in 35 minutes and 20 seconds
......@@ -500,6 +500,8 @@ static int GetOutput(mc_api *api, int i_index, mc_api_out *p_out)
else if (i_index == MC_API_INFO_OUTPUT_FORMAT_CHANGED)
{
AMediaFormat *format = syms.AMediaCodec.getOutputFormat(p_sys->p_codec);
if (unlikely(format == NULL))
return MC_API_ERROR;
p_out->type = MC_OUT_TYPE_CONF;
p_out->b_eos = false;
......@@ -521,6 +523,7 @@ static int GetOutput(mc_api *api, int i_index, mc_api_out *p_out)
p_out->conf.audio.channel_mask = GetFormatInteger(format, "channel-mask");
p_out->conf.audio.sample_rate = GetFormatInteger(format, "sample-rate");
}
syms.AMediaFormat.delete(format);
return 1;
}
return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment