diff yuv4mpeg.c @ 743:af4e24d6310c libavformat

switch to native time bases
author michael
date Sat, 30 Apr 2005 21:43:59 +0000
parents db0a5e0f4db5
children c5077fdab490
line wrap: on
line diff
--- a/yuv4mpeg.c	Tue Apr 26 21:46:46 2005 +0000
+++ b/yuv4mpeg.c	Sat Apr 30 21:43:59 2005 +0000
@@ -36,7 +36,7 @@
     width = st->codec.width;
     height = st->codec.height;
 
-    av_reduce(&raten, &rated, st->codec.frame_rate, st->codec.frame_rate_base, (1UL<<31)-1);
+    av_reduce(&raten, &rated, st->codec.time_base.den, st->codec.time_base.num, (1UL<<31)-1);
     
     aspectn = st->codec.sample_aspect_ratio.num;
     aspectd = st->codec.sample_aspect_ratio.den;
@@ -323,8 +323,7 @@
     st->codec.width = width;
     st->codec.height = height;
     av_reduce(&raten, &rated, raten, rated, (1UL<<31)-1);
-    st->codec.frame_rate = raten;
-    st->codec.frame_rate_base = rated;
+    av_set_pts_info(st, 64, rated, raten);
     st->codec.pix_fmt = pix_fmt;
     st->codec.codec_type = CODEC_TYPE_VIDEO;
     st->codec.codec_id = CODEC_ID_RAWVIDEO;