changeset 567:23b915bb10f5 libavformat

set correct timebase
author michael
date Mon, 18 Oct 2004 09:43:39 +0000
parents c1e54abaa87e
children 256f7b271bdc
files au.c raw.c sol.c wav.c
diffstat 4 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/au.c	Sat Oct 16 21:27:42 2004 +0000
+++ b/au.c	Mon Oct 18 09:43:39 2004 +0000
@@ -148,6 +148,7 @@
     st->codec.codec_id = codec;
     st->codec.channels = channels;
     st->codec.sample_rate = rate;
+    av_set_pts_info(st, 64, 1, rate);
     return 0;
 }
 
--- a/raw.c	Sat Oct 16 21:27:42 2004 +0000
+++ b/raw.c	Mon Oct 18 09:43:39 2004 +0000
@@ -60,6 +60,7 @@
         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;
--- a/sol.c	Sat Oct 16 21:27:42 2004 +0000
+++ b/sol.c	Mon Oct 18 09:43:39 2004 +0000
@@ -117,7 +117,8 @@
     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;
 }
 
--- a/wav.c	Sat Oct 16 21:27:42 2004 +0000
+++ b/wav.c	Mon Oct 18 09:43:39 2004 +0000
@@ -301,7 +301,9 @@
 
     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;