aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-03-02 16:04:49 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-03-02 16:04:49 +0100
commit4ae74c63120c0a48b71cfa295c6da9da72772f81 (patch)
treeb42c0914847a44c4170b736377252ff8c3c5dda8 /ffmpeg.c
parent5167bb2e8eaa75ced83388bacc7b74040871b3bf (diff)
downloadffmpeg-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.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 448a9e2b56..5bc98a7975 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -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);