Fix av_find_best_stream when using a program
The current implementation has a bug, it is returning the stream index
in the found program, and not the stream index in the list of all
streams. The attached patch fixes this issue.
Signed-off-by: Mans Rullgard <firstname.lastname@example.org>
(cherry picked from commit 22ec6b738f1608e4b959fb655cf37c3343ec7e9f)