History

avfilter/af_join: do not use ff_outlink_get_status() on inlink

Paul B Mahol committed 3 years ago

Commit ac6a6d11 parent 51a11241 file · +7 −7Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/af_join.c+7−7
@@ -52,6 +52,7 @@ typedef struct JoinContext { · 51 unmodified lines
52 AVChannelLayout ch_layout;52 AVChannelLayout ch_layout;
53 53
54 int64_t eof_pts;54 int64_t eof_pts;
55 int eof;
55 56
56 ChannelMap *channels;57 ChannelMap *channels;
57 58
@@ -556,10 +557,11 @@ fail: · 498 unmodified lines
556 return ret;557 return ret;
557eof:558eof:
558 for (i = 0; i < ctx->nb_inputs; i++) {559 for (i = 0; i < ctx->nb_inputs; i++) {
559 if (ff_outlink_get_status(ctx->inputs[i]) &&560 if (s->eof &&
560 ff_inlink_queued_samples(ctx->inputs[i]) <= 0 &&561 ff_inlink_queued_samples(ctx->inputs[i]) <= 0 &&
561 !s->input_frames[i]) {562 !s->input_frames[i]) {
562 ff_outlink_set_status(outlink, AVERROR_EOF, s->eof_pts);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 if (ret < 0) {582 if (ret < 0) {
581 return ret;583 return ret;
582 } else if (ret == 0 && ff_inlink_acknowledge_status(ctx->inputs[0], &status, &pts)) {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);585 s->eof |= status == AVERROR_EOF;
584 return 0;
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 ff_inlink_request_frame(ctx->inputs[0]);589 ff_inlink_request_frame(ctx->inputs[0]);
589 return 0;590 return 0;
590 }591 }
@@ -600,11 +601,10 @@ static int activate(AVFilterContext *ctx) · 9 unmodified lines
600 if (ret < 0) {601 if (ret < 0) {
601 return ret;602 return ret;
602 } else if (ff_inlink_acknowledge_status(ctx->inputs[i], &status, &pts)) {603 } else if (ff_inlink_acknowledge_status(ctx->inputs[i], &status, &pts)) {
603 ff_outlink_set_status(ctx->outputs[0], status, pts);604 s->eof |= status == AVERROR_EOF;
604 return 0;
605 }605 }
606 606
607 if (!s->input_frames[i]) {607 if (!s->eof && !s->input_frames[i]) {
608 ff_inlink_request_frame(ctx->inputs[i]);608 ff_inlink_request_frame(ctx->inputs[i]);
609 return 0;609 return 0;
610 }610 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t