Kodi stopped working message when playing a movie

I’ve been using Kodi 17.1 and today I encounter an issue, I detected now that is something related with AAC audio, whenever I play a film with AAC, Kodi crashes with the “Kodi stopped working” message.

I’ve noticed that from time to time Kodi crashes when the audio output device in Directsound: Speakers (when watching from the TV) and I play anything, when I change the audio output device to WASAPI (Receiver) then it plays just fine.

My receiver is compatible with DTS, Dolby Digital, DTS-HD and Dolby True-HD, etc, etc. I’ve never had a problem with AAC audio films just until today, but it could actually be traced back to when I did the upgrade to Kodi 17.1, since I don’t usually play films with AAC audio.

Here is the debug log:
https://paste.ubuntu.com/24416607/

Thanks in advance.