diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 699a982ac2b0b5d31b9f4080bc91e2a765cb2376..d8d58f06bd81499285ef5f5dbbe6dfa7d32ac204 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -193,6 +193,11 @@ static int device_init(AVFormatContext *ctx, int *width, int *height, int pix_fm
         *height = fmt.fmt.pix.height;
     }
 
+    if (pix_fmt != fmt.fmt.pix.pixelformat) {
+        av_log(ctx, AV_LOG_DEBUG, "The V4L2 driver changed the pixel format from 0x%08X to 0x%08X\n", pix_fmt, fmt.fmt.pix.pixelformat);
+        res = -1;
+    }
+
     return res;
 }