Ticket #1753: v4l2_compressed_streams_need_accurate_framesize.patch

File v4l2_compressed_streams_need_accurate_framesize.patch, 724 bytes (added by pete@…, 16 years ago)

patch

  • stream/tvi_v4l2.c

     
    18071807{
    18081808    /*
    18091809      this routine will be called before grab_video_frame
    1810       thus let's return topmost frame's size
     1810      thus let's return topmost frame's size.
     1811      wait for a frame if none are available, since compressed
     1812      formats must have an accurate framesize for -ovc copy
    18111813    */
     1814    int loop_cnt = 0;
     1815    while (priv->video_cnt == 0) {
     1816        usleep(10000);
     1817        if (loop_cnt++ > MAX_LOOP) break;
     1818    }
    18121819    if (priv->video_cnt)
    18131820        return priv->video_ringbuffer[priv->video_head].framesize;
    18141821    /*