Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -52,6 +52,7 @@ typedef struct JoinContext { · 51 unmodified lines | ||
| 52 | 52 | AVChannelLayout ch_layout; |
| 53 | 53 | |
| 54 | 54 | int64_t eof_pts; |
| 55 | + int eof; | |
| 55 | 56 | |
| 56 | 57 | ChannelMap *channels; |
| 57 | 58 | |
| @@ -556,10 +557,11 @@ fail: · 498 unmodified lines | ||
| 556 | 557 | return ret; |
| 557 | 558 | eof: |
| 558 | 559 | for (i = 0; i < ctx->nb_inputs; i++) { |
| 559 | − if (ff_outlink_get_status(ctx->inputs[i]) && | |
| 560 | + if (s->eof && | |
| 560 | 561 | ff_inlink_queued_samples(ctx->inputs[i]) <= 0 && |
| 561 | 562 | !s->input_frames[i]) { |
| 562 | 563 | ff_outlink_set_status(outlink, AVERROR_EOF, s->eof_pts); |
| 564 | + break; | |
| 563 | 565 | } |
| 564 | 566 | } |
| 565 | 567 | |
| @@ -580,11 +582,10 @@ static int activate(AVFilterContext *ctx) · 14 unmodified lines | ||
| 580 | 582 | if (ret < 0) { |
| 581 | 583 | return ret; |
| 582 | 584 | } else if (ret == 0 && ff_inlink_acknowledge_status(ctx->inputs[0], &status, &pts)) { |
| 583 | − ff_outlink_set_status(ctx->outputs[0], status, s->eof_pts); | |
| 584 | − return 0; | |
| 585 | + s->eof |= status == AVERROR_EOF; | |
| 585 | 586 | } |
| 586 | 587 | |
| 587 | − if (!s->input_frames[0] && ff_outlink_frame_wanted(ctx->outputs[0])) { | |
| 588 | + if (!s->eof && !s->input_frames[0] && ff_outlink_frame_wanted(ctx->outputs[0])) { | |
| 588 | 589 | ff_inlink_request_frame(ctx->inputs[0]); |
| 589 | 590 | return 0; |
| 590 | 591 | } |
| @@ -600,11 +601,10 @@ static int activate(AVFilterContext *ctx) · 9 unmodified lines | ||
| 600 | 601 | if (ret < 0) { |
| 601 | 602 | return ret; |
| 602 | 603 | } else if (ff_inlink_acknowledge_status(ctx->inputs[i], &status, &pts)) { |
| 603 | − ff_outlink_set_status(ctx->outputs[0], status, pts); | |
| 604 | − return 0; | |
| 604 | + s->eof |= status == AVERROR_EOF; | |
| 605 | 605 | } |
| 606 | 606 | |
| 607 | − if (!s->input_frames[i]) { | |
| 607 | + if (!s->eof && !s->input_frames[i]) { | |
| 608 | 608 | ff_inlink_request_frame(ctx->inputs[i]); |
| 609 | 609 | return 0; |
| 610 | 610 | } |