aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/ffmpeg_mux.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2022-11-25 14:00:48 +0100
committerAnton Khirnov <anton@khirnov.net>2023-01-29 09:09:59 +0100
commit425b2c4a562878fb58d983f3e5c8b4efba77e40e (patch)
tree3b89a16f15c6f0878b3a438288be1fa78e9bbac7 /fftools/ffmpeg_mux.c
parentb95b2c8492fc1b52afd8fbe67b3be3cd518485d6 (diff)
downloadffmpeg-425b2c4a562878fb58d983f3e5c8b4efba77e40e.tar.gz
fftools/ffmpeg: add options for writing encoding stats
Similar to -vstats, but more flexible: - works for audio as well as video - frame and/or packet information - user-specifiable format
Diffstat (limited to 'fftools/ffmpeg_mux.c')
-rw-r--r--fftools/ffmpeg_mux.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c
index 20524e5a28..1c85bb697d 100644
--- a/fftools/ffmpeg_mux.c
+++ b/fftools/ffmpeg_mux.c
@@ -686,6 +686,14 @@ static void ost_free(OutputStream **post)
av_freep(&ost->enc_ctx->stats_in);
avcodec_free_context(&ost->enc_ctx);
+ for (int i = 0; i < ost->enc_stats_pre.nb_components; i++)
+ av_freep(&ost->enc_stats_pre.components[i].str);
+ av_freep(&ost->enc_stats_pre.components);
+
+ for (int i = 0; i < ost->enc_stats_post.nb_components; i++)
+ av_freep(&ost->enc_stats_post.components[i].str);
+ av_freep(&ost->enc_stats_post.components);
+
av_freep(post);
}