Commit 7a4a412f authored by michael's avatar michael

set correct timebase


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3607 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent bcc3cb33
...@@ -148,6 +148,7 @@ static int au_read_header(AVFormatContext *s, ...@@ -148,6 +148,7 @@ static int au_read_header(AVFormatContext *s,
st->codec.codec_id = codec; st->codec.codec_id = codec;
st->codec.channels = channels; st->codec.channels = channels;
st->codec.sample_rate = rate; st->codec.sample_rate = rate;
av_set_pts_info(st, 64, 1, rate);
return 0; return 0;
} }
......
...@@ -60,6 +60,7 @@ static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -60,6 +60,7 @@ static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap)
case CODEC_TYPE_AUDIO: case CODEC_TYPE_AUDIO:
st->codec.sample_rate = ap->sample_rate; st->codec.sample_rate = ap->sample_rate;
st->codec.channels = ap->channels; st->codec.channels = ap->channels;
av_set_pts_info(st, 64, 1, st->codec.sample_rate);
break; break;
case CODEC_TYPE_VIDEO: case CODEC_TYPE_VIDEO:
st->codec.frame_rate = ap->frame_rate; st->codec.frame_rate = ap->frame_rate;
......
...@@ -118,6 +118,7 @@ static int sol_read_header(AVFormatContext *s, ...@@ -118,6 +118,7 @@ static int sol_read_header(AVFormatContext *s,
st->codec.codec_id = codec; st->codec.codec_id = codec;
st->codec.channels = channels; st->codec.channels = channels;
st->codec.sample_rate = rate; st->codec.sample_rate = rate;
av_set_pts_info(st, 64, 1, rate);
return 0; return 0;
} }
......
...@@ -302,6 +302,8 @@ static int wav_read_header(AVFormatContext *s, ...@@ -302,6 +302,8 @@ static int wav_read_header(AVFormatContext *s,
get_wav_header(pb, &st->codec, size); get_wav_header(pb, &st->codec, size);
st->need_parsing = 1; st->need_parsing = 1;
av_set_pts_info(st, 64, 1, st->codec.sample_rate);
size = find_tag(pb, MKTAG('d', 'a', 't', 'a')); size = find_tag(pb, MKTAG('d', 'a', 't', 'a'));
if (size < 0) if (size < 0)
return -1; return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment