Commit 4ae74c63 authored by Michael Niedermayer's avatar Michael Niedermayer

ffmpeg: print maxrss "-benchmark" data even on errors

Fixes Ticket2297
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 5167bb2e
......@@ -120,6 +120,7 @@ const char *const forced_keyframes_const_names[] = {
static void do_video_stats(OutputStream *ost, int frame_size);
static int64_t getutime(void);
static int64_t getmaxrss(void);
static int run_as_daemon = 0;
static int64_t video_size = 0;
......@@ -408,6 +409,11 @@ static void exit_program(void)
{
int i, j;
if (do_benchmark) {
int maxrss = getmaxrss() / 1024;
printf("bench: maxrss=%ikB\n", maxrss);
}
for (i = 0; i < nb_filtergraphs; i++) {
avfilter_graph_free(&filtergraphs[i]->graph);
for (j = 0; j < filtergraphs[i]->nb_inputs; j++) {
......@@ -3322,8 +3328,7 @@ int main(int argc, char **argv)
exit(1);
ti = getutime() - ti;
if (do_benchmark) {
int maxrss = getmaxrss() / 1024;
printf("bench: utime=%0.3fs maxrss=%ikB\n", ti / 1000000.0, maxrss);
printf("bench: utime=%0.3fs\n", ti / 1000000.0);
}
exit(received_nb_signals ? 255 : 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment