simplify, pass AVStream directly instead of index