diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-03-02 16:04:49 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-03-02 16:04:49 +0100 |
commit | 4ae74c63120c0a48b71cfa295c6da9da72772f81 (patch) | |
tree | b42c0914847a44c4170b736377252ff8c3c5dda8 /ffmpeg.c | |
parent | 5167bb2e8eaa75ced83388bacc7b74040871b3bf (diff) | |
download | ffmpeg-4ae74c63120c0a48b71cfa295c6da9da72772f81.tar.gz |
ffmpeg: print maxrss "-benchmark" data even on errors
Fixes Ticket2297
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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); |