diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2013-03-31 21:32:45 +0400 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2013-04-03 19:44:10 +0400 |
commit | 9566ba91abf42de473b35ac7ef68441eb91189b5 (patch) | |
tree | 995c85633870ca3b4d612ebbfdecaff0fa9012c6 | |
parent | 77fa554b6e083191fab7f6aea596a93f2a389da7 (diff) |
lavfi/f_ebur128: remove request_frame hack.
-rw-r--r-- | libavfilter/f_ebur128.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/libavfilter/f_ebur128.c b/libavfilter/f_ebur128.c index 8aaea738f6..0c7f7714b4 100644 --- a/libavfilter/f_ebur128.c +++ b/libavfilter/f_ebur128.c @@ -128,7 +128,6 @@ typedef struct { /* misc */ int loglevel; ///< log level for frame logging int metadata; ///< whether or not to inject loudness results in frames - int request_fulfilled; ///< 1 if some audio just got pushed, 0 otherwise. FIXME: remove me } EBUR128Context; #define OFFSET(x) offsetof(EBUR128Context, x) @@ -317,6 +316,8 @@ static int config_video_output(AVFilterLink *outlink) DRAW_RECT(ebur128->graph); DRAW_RECT(ebur128->gauge); + outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP; + return 0; } @@ -380,6 +381,8 @@ static int config_audio_output(AVFilterLink *outlink) return AVERROR(ENOMEM); } + outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP; + return 0; } @@ -400,21 +403,6 @@ static struct hist_entry *get_histogram(void) return h; } -/* This is currently necessary for the min/max samples to work properly. - * FIXME: remove me when possible */ -static int audio_request_frame(AVFilterLink *outlink) -{ - int ret; - AVFilterContext *ctx = outlink->src; - EBUR128Context *ebur128 = ctx->priv; - - ebur128->request_fulfilled = 0; - do { - ret = ff_request_frame(ctx->inputs[0]); - } while (!ebur128->request_fulfilled && ret >= 0); - return ret; -} - static av_cold int init(AVFilterContext *ctx, const char *args) { int ret; @@ -463,8 +451,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args) .type = AVMEDIA_TYPE_AUDIO, .config_props = config_audio_output, }; - if (ebur128->metadata) - pad.request_frame = audio_request_frame; if (!pad.name) return AVERROR(ENOMEM); ff_insert_outpad(ctx, ebur128->do_video, &pad); @@ -717,7 +703,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) } } - ebur128->request_fulfilled = 1; return ff_filter_frame(ctx->outputs[ebur128->do_video], insamples); } |