[Core] Fix greedy_sort for codecs containing different fmtp

This commit is contained in:
Andrey Volk 2023-07-06 13:07:13 +03:00
parent cfb39e88dc
commit 41507363f3
1 changed files with 2 additions and 1 deletions

View File

@ -4518,8 +4518,9 @@ static void greedy_sort(switch_media_handle_t *smh, struct matches *matches, int
const switch_codec_implementation_t *imp = codec_array[g];
for(j = 0; j < m_idx; j++) {
if (mtmp[j].imp == imp) {
if (mtmp[j].imp && mtmp[j].imp == imp) {
*&matches[f++] = *&mtmp[j];
mtmp[j].imp = NULL;
}
}
}