set correct timebase
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 18 Oct 2004 09:43:39 +0000 (09:43 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 18 Oct 2004 09:43:39 +0000 (09:43 +0000)
Originally committed as revision 3607 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/au.c
libavformat/raw.c
libavformat/sol.c
libavformat/wav.c

index 6ce326f..1721902 100644 (file)
@@ -148,6 +148,7 @@ static int au_read_header(AVFormatContext *s,
     st->codec.codec_id = codec;
     st->codec.channels = channels;
     st->codec.sample_rate = rate;
+    av_set_pts_info(st, 64, 1, rate);
     return 0;
 }
 
index 23ba500..2ae7449 100644 (file)
@@ -60,6 +60,7 @@ static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap)
         case CODEC_TYPE_AUDIO:
             st->codec.sample_rate = ap->sample_rate;
             st->codec.channels = ap->channels;
+            av_set_pts_info(st, 64, 1, st->codec.sample_rate);
             break;
         case CODEC_TYPE_VIDEO:
             st->codec.frame_rate      = ap->frame_rate;
index 2631310..038feea 100644 (file)
@@ -117,7 +117,8 @@ static int sol_read_header(AVFormatContext *s,
     st->codec.codec_tag = id;
     st->codec.codec_id = codec;
     st->codec.channels = channels;
-    st->codec.sample_rate = rate;
+    st->codec.sample_rate = rate;    
+    av_set_pts_info(st, 64, 1, rate);
     return 0;
 }
 
index a85e9d6..2d28b8f 100644 (file)
@@ -301,7 +301,9 @@ static int wav_read_header(AVFormatContext *s,
 
     get_wav_header(pb, &st->codec, size);
     st->need_parsing = 1;
-    
+
+    av_set_pts_info(st, 64, 1, st->codec.sample_rate);
+
     size = find_tag(pb, MKTAG('d', 'a', 't', 'a'));
     if (size < 0)
         return -1;