Fix av_find_best_stream when using a program
authorBalint Marton <cus@passwd.hu>
Wed, 16 Feb 2011 00:17:13 +0000 (00:17 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 16 Feb 2011 22:00:50 +0000 (23:00 +0100)
commit33af787d8a892b51b7386a051f0cc0174c7e34ea
treec8d4568d7de4b915f3f168da3feba25c11e45f2b
parent20bc55ce5c01662a50bd9081914244b714294e84
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 <mans@mansr.com>
(cherry picked from commit 22ec6b738f1608e4b959fb655cf37c3343ec7e9f)
libavformat/utils.c