Hi,

On Wed, May 25, 2011 at 10:27 AM, Anton Khirnov <[email protected]> wrote:
> ---
>  libavdevice/v4l.c |   21 +++++++++------------
>  1 files changed, 9 insertions(+), 12 deletions(-)
>
> diff --git a/libavdevice/v4l.c b/libavdevice/v4l.c
> index bd011e1..94b670a 100644
> --- a/libavdevice/v4l.c
> +++ b/libavdevice/v4l.c
> @@ -42,7 +42,7 @@ typedef struct {
>     int fd;
>     int frame_format; /* see VIDEO_PALETTE_xxx */
>     int use_mmap;
> -    AVRational time_base;
> +    AVRational fps;
>     int64_t time_frame;
>     int frame_size;
>     struct video_capability video_cap;
> @@ -85,12 +85,6 @@ static int grab_read_header(AVFormatContext *s1, 
> AVFormatParameters *ap)
>     int vformat_num = FF_ARRAY_ELEMS(video_formats);
>     enum PixelFormat pix_fmt = av_get_pix_fmt(s->pix_fmt);
>
> -    if (ap->time_base.den <= 0) {
> -        av_log(s1, AV_LOG_ERROR, "Wrong time base (%d)\n", 
> ap->time_base.den);
> -        return -1;
> -    }
> -    s->time_base = ap->time_base;
[..]
> -        s->time_frame = av_gettime() * s->time_base.den / s->time_base.num;
> +        s->time_frame = av_gettime() * s->fps.num / s->fps.den;

I don't think this is really a framerate, this is really actually a
time base. Right?

Ronald
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to