diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2025-08-11 20:25:43 +0200 |
---|---|---|
committer | Kacper Michajłow <kasper93@gmail.com> | 2025-08-11 19:29:53 +0000 |
commit | 9b94b652db857da290e7a3da67eaa1d23c28f65c (patch) | |
tree | a645862967157d2b351f54ce51c17ca0cd103250 | |
parent | 5a768e8dd0949b12e28b49948dbfbf7387594bfc (diff) | |
download | ffmpeg-9b94b652db857da290e7a3da67eaa1d23c28f65c.tar.gz |
doc/examples/decode_filter_video: use av_usleep
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
-rw-r--r-- | doc/examples/decode_filter_video.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/doc/examples/decode_filter_video.c b/doc/examples/decode_filter_video.c index aacc91c2f7..62ada4bca7 100644 --- a/doc/examples/decode_filter_video.c +++ b/doc/examples/decode_filter_video.c @@ -27,8 +27,6 @@ * @example decode_filter_video.c */ -#define _XOPEN_SOURCE 600 /* for usleep */ -#include <unistd.h> #include <stdio.h> #include <stdlib.h> @@ -38,6 +36,7 @@ #include <libavfilter/buffersrc.h> #include <libavutil/mem.h> #include <libavutil/opt.h> +#include <libavutil/time.h> const char *filter_descr = "scale=78:24,transpose=cclock"; /* other way: @@ -195,7 +194,7 @@ static void display_frame(const AVFrame *frame, AVRational time_base) delay = av_rescale_q(frame->pts - last_pts, time_base, AV_TIME_BASE_Q); if (delay > 0 && delay < 1000000) - usleep(delay); + av_usleep(delay); } last_pts = frame->pts; } |