diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-19 12:44:07 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-19 12:44:07 +0200 |
commit | db3e12a828553171f37c98119679316720e4caed (patch) | |
tree | 3b310b95ae93871f31d541082a0c5969cbce79be | |
parent | 843be56ee18928ecf80bcb20d235c4f9cab5a8fd (diff) | |
parent | 59245e0c5e10a849e67c632cccf4f677b2442e82 (diff) | |
download | ffmpeg-db3e12a828553171f37c98119679316720e4caed.tar.gz |
Merge commit '59245e0c5e10a849e67c632cccf4f677b2442e82'
* commit '59245e0c5e10a849e67c632cccf4f677b2442e82':
avconv: set the encoding/decoding_needed flags earlier
Conflicts:
ffmpeg.c
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | ffmpeg.c | 4 | ||||
-rw-r--r-- | ffmpeg_opt.c | 11 |
2 files changed, 11 insertions, 4 deletions
@@ -2925,10 +2925,6 @@ static int transcode_init(void) goto dump_format; } - if (ist) - ist->decoding_needed |= DECODING_FOR_OST; - ost->encoding_needed = 1; - set_encoder_id(output_files[ost->file_index], ost); if (!ost->filter && diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index 31171b1bf7..b04e319630 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -2156,6 +2156,17 @@ loop_end: } av_dict_free(&unused_opts); + /* set the encoding/decoding_needed flags */ + for (i = of->ost_index; i < nb_output_streams; i++) { + OutputStream *ost = output_streams[i]; + + ost->encoding_needed = !ost->stream_copy; + if (ost->encoding_needed && ost->source_index >= 0) { + InputStream *ist = input_streams[ost->source_index]; + ist->decoding_needed |= DECODING_FOR_OST; + } + } + /* check filename in case of an image number is expected */ if (oc->oformat->flags & AVFMT_NEEDNUMBER) { if (!av_filename_number_test(oc->filename)) { |