diff --git a/veejay-current/veejay-server/libstream/v4l2utils.c b/veejay-current/veejay-server/libstream/v4l2utils.c index cd5b72aa..486da7d8 100644 --- a/veejay-current/veejay-server/libstream/v4l2utils.c +++ b/veejay-current/veejay-server/libstream/v4l2utils.c @@ -636,7 +636,7 @@ static int v4l2_negotiate_pixel_format( v4l2info *v, int host_fmt, int wid, int } else { - veejay_msg(VEEJAY_MSG_DEBUG,"env VEEJAY_V4L2_GREYSCALE_ONLY=[0|1] not set"); + veejay_msg(VEEJAY_MSG_INFO,"env VEEJAY_V4L2_GREYSCALE_ONLY=[0|1] not set, capturing in color"); } if( mjpegcap ) { @@ -669,6 +669,11 @@ static int v4l2_negotiate_pixel_format( v4l2info *v, int host_fmt, int wid, int return 1; } } //@ otherwise, continue with normal preference of formats + else + { + veejay_msg(VEEJAY_MSG_INFO,"env VEEJAY_V4L2_PREFER_JPEG=[0|1] not set, using raw video format"); + } + //@ does capture card support our native format supported = v4l2_tryout_pixel_format( v, native_pixel_format, wid, hei,dw,dh,candidate ); @@ -1274,12 +1279,17 @@ static int v4l2_pull_frame_intern( v4l2info *v ) pkt.data = src; pkt.size = length; - avcodec_decode_video2( + int res = avcodec_decode_video2( v->c, v->picture, &got_picture, &pkt ); + if(res < 0) { + veejay_msg(VEEJAY_MSG_ERROR, "v4l2: error decoding frame"); + return 0; + } + v->info->data[0] = v->picture->data[0]; v->info->data[1] = v->picture->data[1]; v->info->data[2] = v->picture->data[2]; @@ -1382,12 +1392,17 @@ int v4l2_pull_frame(void *vv,VJFrame *dst) pkt.data = src; pkt.size = length; - avcodec_decode_video2( + int res = avcodec_decode_video2( v->c, v->picture, &got_picture, &pkt ); + if( res < 0 ) { + veejay_msg(VEEJAY_MSG_ERROR, "v4l2: error decoding frame"); + return 0; + } + v->info->data[0] = v->picture->data[0]; v->info->data[1] = v->picture->data[1]; v->info->data[2] = v->picture->data[2];