demuxer: fix the wrong stream index which cause crash
License change to LGPL v2.1