comparison asf-enc.c @ 743:af4e24d6310c libavformat

switch to native time bases
author michael
date Sat, 30 Apr 2005 21:43:59 +0000
parents 55081ada3aad
children feca73904e67
comparison
equal deleted inserted replaced
742:21c1ae78f041 743:af4e24d6310c
738 if (pts == AV_NOPTS_VALUE) { 738 if (pts == AV_NOPTS_VALUE) {
739 if (codec->codec_type == CODEC_TYPE_AUDIO) { 739 if (codec->codec_type == CODEC_TYPE_AUDIO) {
740 duration = (codec->frame_number * (int64_t)codec->frame_size * int64_t_C(10000000)) / 740 duration = (codec->frame_number * (int64_t)codec->frame_size * int64_t_C(10000000)) /
741 codec->sample_rate; 741 codec->sample_rate;
742 } else { 742 } else {
743 duration = av_rescale(codec->frame_number * (int64_t)codec->frame_rate_base, 10000000, codec->frame_rate); 743 duration = av_rescale(codec->frame_number * (int64_t)codec->time_base.num, 10000000, codec->time_base.den);
744 } 744 }
745 } else { 745 } else {
746 duration = pts * 10000; 746 duration = pts * 10000;
747 } 747 }
748 if (duration > asf->duration) 748 if (duration > asf->duration)