Skip to content

Commit 72400cc

Browse files
committed
Change null consumer default real_time and terminate
This consumer is primarily useful for benchmarking with the time command where you need to specify terminate_on_pause and real_time != 0.
1 parent 838d6ad commit 72400cc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/modules/core/consumer_null.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* consumer_null.c -- a null consumer
3-
* Copyright (C) 2003-2021 Meltytech, LLC
3+
* Copyright (C) 2003-2025 Meltytech, LLC
44
*
55
* This library is free software; you can redistribute it and/or
66
* modify it under the terms of the GNU Lesser General Public
@@ -23,7 +23,6 @@
2323

2424
// System header files
2525
#include <pthread.h>
26-
#include <stdio.h>
2726
#include <stdlib.h>
2827
#include <string.h>
2928

@@ -47,6 +46,10 @@ mlt_consumer consumer_null_init(mlt_profile profile,
4746

4847
// If memory allocated and initialises without error
4948
if (consumer != NULL) {
49+
mlt_properties properties = MLT_CONSUMER_PROPERTIES(consumer);
50+
mlt_properties_set_int(properties, "real_time", -1);
51+
mlt_properties_set_int(properties, "terminate_on_pause", 1);
52+
5053
// Assign close callback
5154
consumer->close = consumer_close;
5255

0 commit comments

Comments
 (0)