[FFmpeg-cvslog] ffmpeg: Fix regression where various fields where not initialized leading to segfaults
Michael Niedermayer
git at videolan.org
Sat Oct 29 20:39:40 CEST 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Oct 29 20:25:39 2011 +0200| [e71aaad283533f879cb09faaa58060412c55aaa3] | committer: Michael Niedermayer
ffmpeg: Fix regression where various fields where not initialized leading to segfaults
Bug introduced by:
commit f12f40b31aa7f030393cfc756e83f4aa4265e448
Author: Anton Khirnov <anton at khirnov.net>
Date: Tue Aug 30 04:05:20 2011 +0200
ffmpeg: get rid of new* options.
They are confusing, irregular and redundant -- -map already contains all
the information. Stream maps can now be parsed in opt_output_file().
Add a more user-friendly default behavior in case no maps are present.
Breaks -programid for now, but it never worked properly anyway. A better
solution will be written soon.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e71aaad283533f879cb09faaa58060412c55aaa3
---
ffmpeg.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/ffmpeg.c b/ffmpeg.c
index 38464f7..f2c0bf2 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3681,6 +3681,7 @@ static void opt_output_file(void *optctx, const char *filename)
if (!strcmp(file_oformat->name, "ffm") &&
av_strstart(filename, "http:", NULL)) {
+ int j;
/* special case for files sent to ffserver: we get the stream
parameters from ffserver */
int err = read_ffserver_streams(o, oc, filename);
@@ -3688,6 +3689,18 @@ static void opt_output_file(void *optctx, const char *filename)
print_error(filename, err);
exit_program(1);
}
+ for(j = nb_output_streams - oc->nb_streams; j < nb_output_streams; j++) {
+ ost = &output_streams[j];
+ for (i = 0; i < nb_input_streams; i++) {
+ ist = &input_streams[i];
+ if(ist->st->codec->codec_type == ost->st->codec->codec_type){
+ ost->sync_ist= ist;
+ ost->source_index= i;
+ ist->discard = 0;
+ break;
+ }
+ }
+ }
} else if (!o->nb_stream_maps) {
/* pick the "best" stream of each type */
#define NEW_STREAM(type, index)\
More information about the ffmpeg-cvslog
mailing list