diff options
author | J. Dekker <jdek@itanimul.li> | 2024-02-13 08:34:26 +0100 |
---|---|---|
committer | J. Dekker <jdek@itanimul.li> | 2024-02-28 10:28:49 +0100 |
commit | 2b17a74df5fbbc87cdf7a0a784e2e088ab4afd3c (patch) | |
tree | 28f7581e5f4a1681f02cc86e7301ed16509db758 /libavdevice/sdl2.c | |
parent | e4c0cdf8df96047ee195cc594a2a93443e2aa25d (diff) | |
download | ffmpeg-2b17a74df5fbbc87cdf7a0a784e2e088ab4afd3c.tar.gz |
avdevice: deprecate sdl outdev
Signed-off-by: J. Dekker <jdek@itanimul.li>
Diffstat (limited to 'libavdevice/sdl2.c')
-rw-r--r-- | libavdevice/sdl2.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavdevice/sdl2.c b/libavdevice/sdl2.c index 342a253dc0..ec3c3d19b5 100644 --- a/libavdevice/sdl2.c +++ b/libavdevice/sdl2.c @@ -51,6 +51,7 @@ typedef struct { SDL_Rect texture_rect; int inited; + int warned; } SDLContext; static const struct sdl_texture_format_entry { @@ -165,6 +166,15 @@ static int sdl2_write_header(AVFormatContext *s) int i, ret = 0; int flags = 0; + if (!sdl->warned) { + av_log(sdl, AV_LOG_WARNING, + "The sdl output device is deprecated due to being fundamentally incompatible with libavformat API. " + "For monitoring purposes in ffmpeg you can output to a file or use pipes and a video player.\n" + "Example: ffmpeg -i INPUT -f nut -c:v rawvideo - | ffplay -\n" + ); + sdl->warned = 1; + } + if (!sdl->window_title) sdl->window_title = av_strdup(s->url); |