changeset 4620:290808c90f82 libavformat

Change the timebase of the raw demuxer to one that can represent the ts of fields.
author michael
date Sun, 01 Mar 2009 03:48:35 +0000
parents 108bb305ba6f
children 1874d71f6b19
files raw.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/raw.c	Sun Mar 01 03:17:24 2009 +0000
+++ b/raw.c	Sun Mar 01 03:48:35 2009 +0000
@@ -278,13 +278,14 @@
     /* for MJPEG, specify frame rate */
     /* for MPEG-4 specify it, too (most MPEG-4 streams do not have the fixed_vop_rate set ...)*/
     if (ap->time_base.num) {
-        av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den);
+        st->codec->time_base= ap->time_base;
     } else if ( st->codec->codec_id == CODEC_ID_MJPEG ||
                 st->codec->codec_id == CODEC_ID_MPEG4 ||
                 st->codec->codec_id == CODEC_ID_DIRAC ||
                 st->codec->codec_id == CODEC_ID_H264) {
-        av_set_pts_info(st, 64, 1, 25);
+        st->codec->time_base= (AVRational){1,25};
     }
+    av_set_pts_info(st, 64, 1, 1200000);
 
     return 0;
 }