summaryrefslogtreecommitdiff
path: root/avconv.c
diff options
context:
space:
mode:
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();