mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
segafilm: use the sample rate as the time base for audio streams
This commit is contained in:
parent
ea289186f0
commit
4da374f8a9
@ -196,8 +196,13 @@ static int film_read_header(AVFormatContext *s)
|
||||
if (!film->sample_table)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
for(i=0; i<s->nb_streams; i++)
|
||||
avpriv_set_pts_info(s->streams[i], 33, 1, film->base_clock);
|
||||
for (i = 0; i < s->nb_streams; i++) {
|
||||
st = s->streams[i];
|
||||
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
|
||||
avpriv_set_pts_info(st, 33, 1, film->base_clock);
|
||||
else
|
||||
avpriv_set_pts_info(st, 64, 1, film->audio_samplerate);
|
||||
}
|
||||
|
||||
audio_frame_counter = 0;
|
||||
for (i = 0; i < film->sample_count; i++) {
|
||||
@ -212,8 +217,6 @@ static int film_read_header(AVFormatContext *s)
|
||||
if (AV_RB32(&scratch[8]) == 0xFFFFFFFF) {
|
||||
film->sample_table[i].stream = film->audio_stream_index;
|
||||
film->sample_table[i].pts = audio_frame_counter;
|
||||
film->sample_table[i].pts *= film->base_clock;
|
||||
film->sample_table[i].pts /= film->audio_samplerate;
|
||||
|
||||
if (film->audio_type == CODEC_ID_ADPCM_ADX)
|
||||
audio_frame_counter += (film->sample_table[i].sample_size * 32 /
|
||||
|
Loading…
Reference in New Issue
Block a user