Module: libav
Branch: master
Commit: a3b15e411d9624a37919e91fe81aec9c98457ed8

Author:    Anton Khirnov <[email protected]>
Committer: Anton Khirnov <[email protected]>
Date:      Fri Jun  3 13:29:43 2011 +0200

fbdev,v4l2: remove some forgotten uses of AVFormatParameters.time_base.

---

 libavdevice/fbdev.c |    2 +-
 libavdevice/v4l2.c  |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavdevice/fbdev.c b/libavdevice/fbdev.c
index 58b3ab4..7e9ffe5 100644
--- a/libavdevice/fbdev.c
+++ b/libavdevice/fbdev.c
@@ -169,7 +169,7 @@ av_cold static int fbdev_read_header(AVFormatContext *avctx,
     st->codec->width      = fbdev->width;
     st->codec->height     = fbdev->heigth;
     st->codec->pix_fmt    = pix_fmt;
-    st->codec->time_base  = ap->time_base;
+    st->codec->time_base  = (AVRational){fbdev->fps.den, fbdev->fps.num};
     st->codec->bit_rate   =
         fbdev->width * fbdev->heigth * fbdev->bytes_per_pixel * 
av_q2d(fbdev->fps) * 8;
 
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 0cd4f38..98ff82e 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -546,6 +546,8 @@ static int v4l2_set_parameters(AVFormatContext *s1, 
AVFormatParameters *ap)
             return AVERROR(errno);
         }
     }
+    s1->streams[0]->codec->time_base.den = tpf->denominator;
+    s1->streams[0]->codec->time_base.num = tpf->numerator;
 
     return 0;
 }
@@ -679,8 +681,6 @@ static int v4l2_read_header(AVFormatContext *s1, 
AVFormatParameters *ap)
     st->codec->codec_id = codec_id;
     st->codec->width = s->width;
     st->codec->height = s->height;
-    st->codec->time_base.den = ap->time_base.den;
-    st->codec->time_base.num = ap->time_base.num;
     st->codec->bit_rate = s->frame_size * 1/av_q2d(st->codec->time_base) * 8;
 
 out:

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

Reply via email to