Unified · Split
| @@ -67,7 +67,6 @@ typedef struct DynamicAudioNormalizerContext { · 66 unmodified lines | |||
| 67 | double *weights; | 67 | double *weights; |
| 68 | 68 | ||
| 69 | int channels; | 69 | int channels; |
| 70 | int delay; | ||
| 71 | int eof; | 70 | int eof; |
| 72 | int64_t pts; | 71 | int64_t pts; |
| 73 | 72 | ||
| @@ -345,7 +344,6 @@ static int config_input(AVFilterLink *inlink) · 271 unmodified lines | |||
| 345 | init_gaussian_filter(s); | 344 | init_gaussian_filter(s); |
| 346 | 345 | ||
| 347 | s->channels = inlink->channels; | 346 | s->channels = inlink->channels; |
| 348 | s->delay = s->filter_size; | ||
| 349 | 347 | ||
| 350 | return 0; | 348 | return 0; |
| 351 | } | 349 | } |
| @@ -717,7 +715,6 @@ static int flush_buffer(DynamicAudioNormalizerContext *s, AVFilterLink *inlink, · 365 unmodified lines | |||
| 717 | } | 715 | } |
| 718 | } | 716 | } |
| 719 | 717 | ||
| 720 | s->delay--; | ||
| 721 | return filter_frame(inlink, out); | 718 | return filter_frame(inlink, out); |
| 722 | } | 719 | } |
| 723 | 720 | ||
| @@ -734,7 +731,6 @@ static int flush(AVFilterLink *outlink) · 10 unmodified lines | |||
| 734 | 731 | ||
| 735 | s->pts = out->pts; | 732 | s->pts = out->pts; |
| 736 | ret = ff_filter_frame(outlink, out); | 733 | ret = ff_filter_frame(outlink, out); |
| 737 | s->delay = s->queue.available; | ||
| 738 | } | 734 | } |
| 739 | 735 | ||
| 740 | return ret; | 736 | return ret; |
| @@ -772,10 +768,10 @@ static int activate(AVFilterContext *ctx) · 31 unmodified lines | |||
| 772 | s->eof = 1; | 768 | s->eof = 1; |
| 773 | } | 769 | } |
| 774 | 770 | ||
| 775 | if (s->eof && s->delay > 0) | 771 | if (s->eof && s->queue.available) |
| 776 | return flush(outlink); | 772 | return flush(outlink); |
| 777 | 773 | ||
| 778 | if (s->eof && s->delay <= 0) { | 774 | if (s->eof && !s->queue.available) { |
| 779 | ff_outlink_set_status(outlink, AVERROR_EOF, s->pts); | 775 | ff_outlink_set_status(outlink, AVERROR_EOF, s->pts); |
| 780 | return 0; | 776 | return 0; |
| 781 | } | 777 | } |