ffmpeg: print maxrss "-benchmark" data even on errors
Fixes Ticket2297 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
5167bb2e8e
commit
4ae74c6312
9
ffmpeg.c
9
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user