demux_lavf: fix initial "-vid"-based video selection

In 59058b54a7 (from svn r31129) Aurelien
changed demux_lavf -vid indexing, but failed to change the initial
video stream selection based on -vid to match. Fix.
This commit is contained in:
Uoti Urpala 2011-03-31 00:57:31 +03:00
parent 5949f5b9fd
commit cb4394aea3
1 changed files with 2 additions and 1 deletions

View File

@ -428,7 +428,8 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
int biClrUsed;
int biClrImportant;
*/
if(demuxer->video->id != i && demuxer->video->id != -1)
if(demuxer->video->id != priv->video_streams
&& demuxer->video->id != -1)
st->discard= AVDISCARD_ALL;
else{
demuxer->video->id = i;