summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-12 12:02:34 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-12 13:13:12 +0200
commit52ce6be86b6a4404ad5d7d92266ea6cbc103102f (patch)
treed31d4fc93c42897c15743951339196f6ce9964c4 /ffmpeg.c
parent0a64fb7fb0bb2492fec338119f68b62954100959 (diff)
parent48e50921337984ba4ec2c1cafe45d43787f84498 (diff)
Merge commit '48e50921337984ba4ec2c1cafe45d43787f84498'
* commit '48e50921337984ba4ec2c1cafe45d43787f84498': avconv: make -shortest work with streamcopy Conflicts: ffmpeg.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index d5e9afa8b7..49e5596792 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1127,6 +1127,19 @@ static void do_video_stats(OutputStream *ost, int frame_size)
}
}
+static void finish_output_stream(OutputStream *ost)
+{
+ OutputFile *of = output_files[ost->file_index];
+ int i;
+
+ ost->finished = ENCODER_FINISHED | MUXER_FINISHED;
+
+ if (of->shortest) {
+ for (i = 0; i < of->ctx->nb_streams; i++)
+ output_streams[of->ost_index + i]->finished = ENCODER_FINISHED | MUXER_FINISHED;
+ }
+}
+
/**
* Get and encode new output from any of the filtergraphs, without causing
* activity.
@@ -3315,7 +3328,7 @@ static int process_input(int file_index)
if (ost->source_index == ifile->ist_index + i &&
(ost->stream_copy || ost->enc->type == AVMEDIA_TYPE_SUBTITLE))
- close_output_stream(ost);
+ finish_output_stream(ost);
}
}