diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-03-13 00:06:30 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-03-13 00:06:30 +0400 |
commit | 771919e11fcdf6fb518c04d55b83fb3e50c35a58 (patch) | |
tree | b62c39a60e32e81665830b97c139ac7e14bacd10 /ffmpeg_opt.c | |
parent | 49e87819d09e4c7a7bbbfa19dff12c2d0db29584 (diff) | |
parent | 6deae8e0530a885b76f149841ed4899cb438ec23 (diff) |
Merge commit '6deae8e0530a885b76f149841ed4899cb438ec23'
* commit '6deae8e0530a885b76f149841ed4899cb438ec23':
FATE: remove the -dct option from some decoding tests.
avconv: use a local variable for InputFile in open_input_file().
Conflicts:
tests/fate/microsoft.mak
tests/fate/real.mak
tests/fate/video.mak
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg_opt.c')
-rw-r--r-- | ffmpeg_opt.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index e6a9ee7679..196ab3c477 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -698,6 +698,7 @@ static void dump_attachment(AVStream *st, const char *filename) static int open_input_file(OptionsContext *o, const char *filename) { + InputFile *f; AVFormatContext *ic; AVInputFormat *file_iformat = NULL; int err, i, ret; @@ -819,14 +820,16 @@ static int open_input_file(OptionsContext *o, const char *filename) av_dump_format(ic, nb_input_files, filename, 0); GROW_ARRAY(input_files, nb_input_files); - if (!(input_files[nb_input_files - 1] = av_mallocz(sizeof(*input_files[0])))) + f = av_mallocz(sizeof(*f)); + if (!f) exit(1); + input_files[nb_input_files - 1] = f; - input_files[nb_input_files - 1]->ctx = ic; - input_files[nb_input_files - 1]->ist_index = nb_input_streams - ic->nb_streams; - input_files[nb_input_files - 1]->ts_offset = o->input_ts_offset - (copy_ts ? 0 : timestamp); - input_files[nb_input_files - 1]->nb_streams = ic->nb_streams; - input_files[nb_input_files - 1]->rate_emu = o->rate_emu; + f->ctx = ic; + f->ist_index = nb_input_streams - ic->nb_streams; + f->ts_offset = o->input_ts_offset - (copy_ts ? 0 : timestamp); + f->nb_streams = ic->nb_streams; + f->rate_emu = o->rate_emu; for (i = 0; i < o->nb_dump_attachment; i++) { int j; |