diff options
Diffstat (limited to 'include/hardware')
-rw-r--r-- | include/hardware/audio.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/hardware/audio.h b/include/hardware/audio.h index b8f3512..1533ee1 100644 --- a/include/hardware/audio.h +++ b/include/hardware/audio.h @@ -384,6 +384,8 @@ static inline size_t audio_stream_frame_size(struct audio_stream *s) size_t chan_samp_sz; uint32_t chan_mask = s->get_channels(s); int format = s->get_format(s); + char *tmpparam; + int isParamEqual; #ifdef QCOM_HARDWARE if (audio_is_input_channel(chan_mask)) { @@ -391,7 +393,10 @@ static inline size_t audio_stream_frame_size(struct audio_stream *s) AUDIO_CHANNEL_IN_MONO ); } - if(!strcmp(s->get_parameters(s, "voip_flag"),"voip_flag=1")) { + tmpparam = s->get_parameters(s, "voip_flag"); + isParamEqual = !strcmp(tmpparam,"voip_flag=1"); + free(tmpparam); + if(isParamEqual) { if(format != AUDIO_FORMAT_PCM_8_BIT) return popcount(chan_mask) * sizeof(int16_t); else |