[FFmpeg-devel] [PATCH] lavd: deprecate SDL device

Josh de Kock josh at itanimul.li
Sat Sep 10 22:53:21 EEST 2016


SDL1 has been unmaintained for quite a while (version 1.2.15 was
released 4 years ago). Due to how SDL2 works (it requires the main
thread), there won't be able to be a replacement to the SDL avdevice
if ffplay were to switch to SDL2 in the future. This commit would
also help in getting ffplay to switch to SDL2 as there'd no longer
be a dependency on the SDL avdevice.

Signed-off-by: Josh de Kock <josh at itanimul.li>
---
 configure         | 3 +++
 libavdevice/sdl.c | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/configure b/configure
index b11ca7f..48cce34 100755
--- a/configure
+++ b/configure
@@ -5850,6 +5850,9 @@ if enabled gcrypt; then
     fi
 fi
 
+if ! enabled sdl; then
+    disable sdl_outdev
+fi
 if ! disabled sdl; then
     SDL_CONFIG="${cross_prefix}sdl-config"
     if check_pkg_config sdl SDL_events.h SDL_PollEvent; then
diff --git a/libavdevice/sdl.c b/libavdevice/sdl.c
index 4322750..06ef35c 100644
--- a/libavdevice/sdl.c
+++ b/libavdevice/sdl.c
@@ -237,6 +237,8 @@ static int sdl_write_header(AVFormatContext *s)
     AVCodecParameters *par = st->codecpar;
     int i, ret;
 
+    av_log(s, AV_LOG_WARNING, "The SDL output device is deprecated.\n");
+
     if (!sdl->window_title)
         sdl->window_title = av_strdup(s->filename);
     if (!sdl->icon_title)
-- 
2.7.4 (Apple Git-66)



More information about the ffmpeg-devel mailing list