[FFmpeg-devel] [PATCH] ffmpeg.c: Multiple Audio/Video/Data Streams support in the same program
Chiranjeevi Melam
cmelam at rgbnetworks.com
Wed Aug 24 23:00:55 CEST 2011
All,
The patch is to add the support of "Multiple Audio/Video/Data Streams support in the same program". FFMPEG does not have this support before.
Thanks,
Chiru
diff --git a/ffmpeg/ffmpeg_orig.c b/ffmpeg/ffmpeg.c
index 95b3252..166ba3a 100755
--- a/ffmpeg/ffmpeg_orig.c
+++ b/ffmpeg/ffmpeg.c
@@ -2126,6 +2126,7 @@ static int transcode(AVFormatContext **output_files,
}
n = 0;
for(k=0;k<nb_output_files;k++) {
+ int mbegin = n, m, multi_tracks;
os = output_files[k];
for(i=0;i<os->nb_streams;i++,n++) {
int found;
@@ -2163,7 +2164,20 @@ static int transcode(AVFormatContext **output_files,
}
}
}
- if (ist->discard && ist->st->discard != AVDISCARD_ALL && !skip &&
+ multi_tracks =0;
+ if(n){
+ for(m=mbegin; m<n; m++) {
+ if(ost_table[m]->source_index == j) {
+ multi_tracks = 1;
+ break;
+ }
+ }
+ if(multi_tracks) {
+ continue;
+ }
+ }
+ if (ist->st->discard != AVDISCARD_ALL && !skip &&
+ //if (ist->discard && ist->st->discard != AVDISCARD_ALL && !skip &&
ist->st->codec->codec_type == ost->st->codec->codec_type &&
nb_frame_threshold[ist->st->codec->codec_type] <= ist->st->codec_info_nb_frames) {
ost->source_index = j;
More information about the ffmpeg-devel
mailing list