---
 libavutil/timer.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavutil/timer.h b/libavutil/timer.h
index 861ba7e9d7..2cd299eca3 100644
--- a/libavutil/timer.h
+++ b/libavutil/timer.h
@@ -105,9 +105,9 @@
 #if CONFIG_LINUX_PERF
 
 #define START_TIMER                                                         \
-    static int linux_perf_fd;                                               \
+    static int linux_perf_fd = -1;                                          \
     uint64_t tperf;                                                         \
-    if (!linux_perf_fd) {                                                   \
+    if (linux_perf_fd == -1) {                                              \
         struct perf_event_attr attr = {                                     \
             .type           = PERF_TYPE_HARDWARE,                           \
             .size           = sizeof(struct perf_event_attr),               \
-- 
2.40.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to