Commit db3e12a8 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '59245e0c'

* commit '59245e0c':
  avconv: set the encoding/decoding_needed flags earlier

Conflicts:
	ffmpeg.c
Merged-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parents 843be56e 59245e0c
...@@ -2925,10 +2925,6 @@ static int transcode_init(void) ...@@ -2925,10 +2925,6 @@ static int transcode_init(void)
goto dump_format; goto dump_format;
} }
if (ist)
ist->decoding_needed |= DECODING_FOR_OST;
ost->encoding_needed = 1;
set_encoder_id(output_files[ost->file_index], ost); set_encoder_id(output_files[ost->file_index], ost);
if (!ost->filter && if (!ost->filter &&
......
...@@ -2156,6 +2156,17 @@ loop_end: ...@@ -2156,6 +2156,17 @@ loop_end:
} }
av_dict_free(&unused_opts); 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 */ /* check filename in case of an image number is expected */
if (oc->oformat->flags & AVFMT_NEEDNUMBER) { if (oc->oformat->flags & AVFMT_NEEDNUMBER) {
if (!av_filename_number_test(oc->filename)) { if (!av_filename_number_test(oc->filename)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment