mirror of
https://github.com/game-stop/veejay.git
synced 2025-12-14 20:00:01 +01:00
check if width and height are set for loopback device
This commit is contained in:
@@ -954,6 +954,14 @@ void *v4l2open ( const char *file, const int input_channel, int host_fmt, int wi
|
|||||||
v4l2_enum_video_standards( v, norm );
|
v4l2_enum_video_standards( v, norm );
|
||||||
v4l2_enum_frame_sizes(v);
|
v4l2_enum_frame_sizes(v);
|
||||||
|
|
||||||
|
if( v->is_vloopback == 1 && (wid == 0 || hei == 0 ) ) {
|
||||||
|
veejay_msg(VEEJAY_MSG_ERROR, "v4l2: please set width and height (-w and -h) for video loopback device");
|
||||||
|
free(v);
|
||||||
|
close(fd);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if( v4l2_configure_format( v, host_fmt, wid, hei ) == 0 ) {
|
if( v4l2_configure_format( v, host_fmt, wid, hei ) == 0 ) {
|
||||||
veejay_msg(VEEJAY_MSG_ERROR, "v4l2: Failed to negotiate pixel format with your capture device.");
|
veejay_msg(VEEJAY_MSG_ERROR, "v4l2: Failed to negotiate pixel format with your capture device.");
|
||||||
free(v);
|
free(v);
|
||||||
|
|||||||
Reference in New Issue
Block a user