Revision 7c7e7464

View differences:

libavformat/v4l2.c
308 308
        return -1;
309 309
    }
310 310
    assert (buf.index < s->buffers);
311
    assert(buf.bytesused == s->frame_size);
311
    if (buf.bytesused != s->frame_size) {
312
        av_log(NULL, AV_LOG_ERROR, "The v4l2 frame is %d bytes, but %d bytes are expected\n", buf.bytesused, s->frame_size);
313

  
314
        return -1;
315
    }
316

  
312 317
    /* Image is at s->buff_start[buf.index] */
313 318
    memcpy(frame, s->buf_start[buf.index], buf.bytesused);
314 319
    *ts = buf.timestamp.tv_sec * int64_t_C(1000000) + buf.timestamp.tv_usec;

Also available in: Unified diff