diff --git a/libavdevice/sdl2.c b/libavdevice/sdl2.c
index 3d1ea42a58ca2619f3b5280399b76908e76c6bd7..d083d29cbc78335cc511ab7ac0e84bd48138da2b 100644
--- a/libavdevice/sdl2.c
+++ b/libavdevice/sdl2.c
@@ -67,6 +67,8 @@ static const struct sdl_texture_format_entry {
      * { AV_PIX_FMT_NONE, SDL_PIXELFORMAT_RGBA5551 },
      * { AV_PIX_FMT_NONE, SDL_PIXELFORMAT_ABGR1555 },
      * { AV_PIX_FMT_NONE, SDL_PIXELFORMAT_BGRA5551 },
+     * { AV_PIX_FMT_RGB24,SDL_PIXELFORMAT_RGB888 },
+     * { AV_PIX_FMT_BGR24,SDL_PIXELFORMAT_BGR888 },
      * { AV_PIX_FMT_NONE, SDL_PIXELFORMAT_ARGB2101010 },
     */
     { AV_PIX_FMT_RGB8,    SDL_PIXELFORMAT_RGB332 },
@@ -77,8 +79,6 @@ static const struct sdl_texture_format_entry {
     { AV_PIX_FMT_BGR565,  SDL_PIXELFORMAT_BGR565 },
     { AV_PIX_FMT_RGB24,   SDL_PIXELFORMAT_RGB24 },
     { AV_PIX_FMT_BGR24,   SDL_PIXELFORMAT_BGR24 },
-    { AV_PIX_FMT_RGB24,   SDL_PIXELFORMAT_RGB888 },
-    { AV_PIX_FMT_BGR24,   SDL_PIXELFORMAT_BGR888 },
     { AV_PIX_FMT_RGB0,    SDL_PIXELFORMAT_RGBX8888 }, // needs to be checked
     { AV_PIX_FMT_BGR0,    SDL_PIXELFORMAT_BGRX8888 }, // "
     { AV_PIX_FMT_ARGB,    SDL_PIXELFORMAT_ARGB8888 }, // "