libopencore-amrnbenc: fix end-of-stream handling