Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -67,7 +67,6 @@ typedef struct DynamicAudioNormalizerContext { · 66 unmodified lines | ||
| 67 | 67 | double *weights; |
| 68 | 68 | |
| 69 | 69 | int channels; |
| 70 | − int delay; | |
| 71 | 70 | int eof; |
| 72 | 71 | int64_t pts; |
| 73 | 72 | |
| @@ -345,7 +344,6 @@ static int config_input(AVFilterLink *inlink) · 271 unmodified lines | ||
| 345 | 344 | init_gaussian_filter(s); |
| 346 | 345 | |
| 347 | 346 | s->channels = inlink->channels; |
| 348 | − s->delay = s->filter_size; | |
| 349 | 347 | |
| 350 | 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 | 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 | 732 | s->pts = out->pts; |
| 736 | 733 | ret = ff_filter_frame(outlink, out); |
| 737 | − s->delay = s->queue.available; | |
| 738 | 734 | } |
| 739 | 735 | |
| 740 | 736 | return ret; |
| @@ -772,10 +768,10 @@ static int activate(AVFilterContext *ctx) · 31 unmodified lines | ||
| 772 | 768 | s->eof = 1; |
| 773 | 769 | } |
| 774 | 770 | |
| 775 | − if (s->eof && s->delay > 0) | |
| 771 | + if (s->eof && s->queue.available) | |
| 776 | 772 | return flush(outlink); |
| 777 | 773 | |
| 778 | − if (s->eof && s->delay <= 0) { | |
| 774 | + if (s->eof && !s->queue.available) { | |
| 779 | 775 | ff_outlink_set_status(outlink, AVERROR_EOF, s->pts); |
| 780 | 776 | return 0; |
| 781 | 777 | } |