|
3 | 3 | #include <libavfilter/avfilter.h> |
4 | 4 | #include <libavfilter/buffersink.h> |
5 | 5 | #include <libavfilter/buffersrc.h> |
6 | | -#include <libavutil/opt.h> |
7 | 6 | #include <string.h> |
8 | 7 |
|
9 | 8 | #ifdef _WIN32 |
@@ -154,22 +153,11 @@ char* loudnorm_get_stats( |
154 | 153 | av_frame_unref(filt_frame); |
155 | 154 | } |
156 | 155 |
|
157 | | - // Force stats print |
158 | | - if (loudnorm_ctx) { |
159 | | - av_log_set_level(AV_LOG_INFO); |
160 | | - av_opt_set(loudnorm_ctx, "print_format", "json", AV_OPT_SEARCH_CHILDREN); |
161 | | - av_opt_set(loudnorm_ctx, "measured_i", NULL, AV_OPT_SEARCH_CHILDREN); |
162 | | - av_opt_set(loudnorm_ctx, "measured_lra", NULL, AV_OPT_SEARCH_CHILDREN); |
163 | | - av_opt_set(loudnorm_ctx, "measured_tp", NULL, AV_OPT_SEARCH_CHILDREN); |
164 | | - av_opt_set(loudnorm_ctx, "measured_thresh", NULL, AV_OPT_SEARCH_CHILDREN); |
165 | | - avfilter_init_str(loudnorm_ctx, NULL); |
166 | | - } |
167 | | - |
168 | | - avfilter_graph_request_oldest(filter_graph); |
| 156 | + // Pushes graph |
| 157 | + avfilter_graph_free(&filter_graph); |
169 | 158 |
|
170 | 159 | end: |
171 | 160 | avcodec_free_context(&codec_ctx); |
172 | | - avfilter_graph_free(&filter_graph); |
173 | 161 | avformat_close_input(&fmt_ctx); |
174 | 162 | av_frame_free(&filt_frame); |
175 | 163 | av_frame_free(&frame); |
|
0 commit comments