Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-08-11 13:50:32 +0400
committerAnton Khirnov <anton@khirnov.net>2012-08-18 10:48:30 +0400
commit3c0df9058438b68925be2fc6f5af2a05086ad99e (patch)
treebc1a2ace6271700af353e68bf7519ff2b852e1b1 /avconv.c
parent91e59fea30f57af7abd1ad6a68a8f6663805ee44 (diff)
avconv: make -shortest a per-output file option.
Diffstat (limited to 'avconv.c')
-rw-r--r--avconv.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/avconv.c b/avconv.c
index 83ff8b45e1..735fc3e767 100644
--- a/avconv.c
+++ b/avconv.c
@@ -719,7 +719,7 @@ static int poll_filter(OutputStream *ost)
*/
static int poll_filters(void)
{
- int i, ret = 0;
+ int i, j, ret = 0;
while (ret >= 0 && !received_sigterm) {
OutputStream *ost = NULL;
@@ -746,10 +746,14 @@ static int poll_filters(void)
ret = poll_filter(ost);
if (ret == AVERROR_EOF) {
+ OutputFile *of = output_files[ost->file_index];
+
ost->finished = 1;
- if (opt_shortest)
- return ret;
+ if (of->shortest) {
+ for (j = 0; j < of->ctx->nb_streams; j++)
+ output_streams[of->ost_index + j]->finished = 1;
+ }
ret = 0;
} else if (ret == AVERROR(EAGAIN))
@@ -2170,10 +2174,7 @@ static int process_input(void)
}
}
- if (opt_shortest)
- return AVERROR_EOF;
- else
- return AVERROR(EAGAIN);
+ return AVERROR(EAGAIN);
}
reset_eagain();