OSDN Git Service

Fix av_find_best_stream when providing a wanted stream
authorMarton Balint <cus@passwd.hu>
Sun, 20 Feb 2011 00:18:30 +0000 (01:18 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 11 Mar 2011 12:05:46 +0000 (13:05 +0100)
commit5126a8ecbbb6981ac29f437f1d35f5248c8f234d
tree01a141b5b9ddd40a59c634446c4b3aecea1f7125
parentfa14610df5e21fd562922a5622daf42f746df978
Fix av_find_best_stream when providing a wanted stream

In the main loop, stream_number is incremented after checking the stream type,
so the search usually will not find the wanted stream.

This patch eliminates the useless stream_number variable and introduces a new
one, called real_stream_index to store the real stream index of the current
stream, no matter if we are looping through all the streams or only the streams
of a program.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/utils.c