[FFmpeg-cvslog] r22002 - trunk/ffmpeg.c
michael
subversion
Tue Feb 23 17:31:15 CET 2010
Author: michael
Date: Tue Feb 23 17:31:14 2010
New Revision: 22002
Log:
Favor streams with more packets if the user did not specify what she wants.
Fixes issue1156
Modified:
trunk/ffmpeg.c
Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c Tue Feb 23 17:29:57 2010 (r22001)
+++ trunk/ffmpeg.c Tue Feb 23 17:31:14 2010 (r22002)
@@ -1777,6 +1777,7 @@ static int av_encode(AVFormatContext **o
}
} else {
+ int best_nb_frames=-1;
/* get corresponding input stream index : we select the first one with the right type */
found = 0;
for(j=0;j<nb_istreams;j++) {
@@ -1797,9 +1798,11 @@ static int av_encode(AVFormatContext **o
}
if (ist->discard && ist->st->discard != AVDISCARD_ALL && !skip &&
ist->st->codec->codec_type == ost->st->codec->codec_type) {
- ost->source_index = j;
- found = 1;
- break;
+ if(best_nb_frames < ist->st->codec_info_nb_frames){
+ best_nb_frames= ist->st->codec_info_nb_frames;
+ ost->source_index = j;
+ found = 1;
+ }
}
}
More information about the ffmpeg-cvslog
mailing list