You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
The v4l2 driver can silently change the pixel format in the
VIDIOC_S_FMT ioctl(). In this case, device_init() should fail so that a different pixel format is tried. Patch by Jens Rosenboom (jens DOT rosenboom AT eu DOT panasonic DOT com) Originally committed as revision 15660 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
committed by
Luca Abeni
parent
0223bd6f52
commit
3d0d9a5e3b
@@ -193,6 +193,11 @@ static int device_init(AVFormatContext *ctx, int *width, int *height, int pix_fm
|
|||||||
*height = fmt.fmt.pix.height;
|
*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;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user