I have a similar issue. I have a bunch of x264/ac3 files converted to aac (only the audio part is converted) and the audio stops sometimes at 7 minutes, sometimes ~30. It happens in the same interval when the file is played (every 7 minutes or every 30 minutes). I tried converting them with different ffmpeg-settings and it's always the same (I tried using a different encoder: libfaac, aac and libfdk_aac; tried different bitrates for the audio part (constant and variable); tried to convert without subtitles, without metatags, etc.). Essentially I tried everything with those files and the only solution I found so far is converting them with HandBrake which actually is no option because of the reencode of the video-part and therefore taking like forever to complete (I have about 100 of those files).
Any more ideas why this could happen? I tried the solution provided, but it's not a general issue.