[FFmpeg-devel] [PATCH] sdl2: map AV_PIX_FMT_NONE to SDL_PIXELFORMAT_UNKNOWN

Alfred E. Heggestad alfred.heggestad at gmail.com
Wed Oct 30 13:39:56 EET 2019


---
-------------- next part --------------
From 6331f77ca00acdaaee0db6b0d2d04fff9f1c70c9 Mon Sep 17 00:00:00 2001
From: "Alfred E. Heggestad" <alfred.heggestad at gmail.com>
Date: Wed, 30 Oct 2019 12:30:49 +0100
Subject: [PATCH] sdl2: map AV_PIX_FMT_NONE to SDL_PIXELFORMAT_UNKNOWN

This does not change the programs behaviour.
The purpose of this patch is to make the code more
robust against future changes, in case someone
starts using the AV_PIX_FMT_NONE entry.

Signed-off-by: Alfred E. Heggestad <alfred.heggestad at gmail.com>
---
 libavdevice/sdl2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavdevice/sdl2.c b/libavdevice/sdl2.c
index d6fc74a66c..4eafde10de 100644
--- a/libavdevice/sdl2.c
+++ b/libavdevice/sdl2.c
@@ -91,7 +91,7 @@ static const struct sdl_texture_format_entry {
     { AV_PIX_FMT_YUV420P, SDL_PIXELFORMAT_IYUV },
     { AV_PIX_FMT_YUYV422, SDL_PIXELFORMAT_YUY2 },
     { AV_PIX_FMT_UYVY422, SDL_PIXELFORMAT_UYVY },
-    { AV_PIX_FMT_NONE,    0                },
+    { AV_PIX_FMT_NONE,    SDL_PIXELFORMAT_UNKNOWN },
 };
 
 static void compute_texture_rect(AVFormatContext *s)
-- 
2.20.1 (Apple Git-117)



More information about the ffmpeg-devel mailing list