fprintf(stderr,"Cannot Sync\n");
av_log(NULL, AV_LOG_ERROR, "Cannot Sync\n");
static int v4l_mm_read_picture(VideoData *s, uint8_t *buf){    uint8_t *ptr;    /* Setup to capture the next frame */    s->gb_buf.frame = (s->gb_frame + 1) % s->gb_buffers.frames;    if (ioctl(s->fd, VIDIOCMCAPTURE, &s->gb_buf) < 0) {        if (errno == EAGAIN)            fprintf(stderr,"Cannot Sync\n");        else            perror("VIDIOCMCAPTURE");        return -EIO;    }    while (ioctl(s->fd, VIDIOCSYNC, &s->gb_frame) < 0 &&           (errno == EAGAIN || errno == EINTR));    ptr = s->video_buf + s->gb_buffers.offsets[s->gb_frame];    memcpy(buf, ptr, s->frame_size);    /* This is now the grabbing frame */    s->gb_frame = s->gb_buf.frame;    return s->frame_size;}