aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-07-19 12:44:07 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-19 12:44:07 +0200
commitdb3e12a828553171f37c98119679316720e4caed (patch)
tree3b310b95ae93871f31d541082a0c5969cbce79be
parent843be56ee18928ecf80bcb20d235c4f9cab5a8fd (diff)
parent59245e0c5e10a849e67c632cccf4f677b2442e82 (diff)
downloadffmpeg-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.c4
-rw-r--r--ffmpeg_opt.c11
2 files changed, 11 insertions, 4 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 844034e7e7..73792ed44f 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -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)) {