Commit db07fc20 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mpegts: Avoid float in bitrate calculation

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 1b236541
......@@ -2576,7 +2576,7 @@ static int mpegts_read_header(AVFormatContext *s)
/* NOTE2: it is only the bitrate of the start of the stream */
ts->pcr_incr = (pcrs[1] - pcrs[0]) / (packet_count[1] - packet_count[0]);
ts->cur_pcr = pcrs[0] - ts->pcr_incr * packet_count[0];
s->bit_rate = TS_PACKET_SIZE * 8 * 27e6 / ts->pcr_incr;
s->bit_rate = TS_PACKET_SIZE * 8 * 27000000LL / ts->pcr_incr;
st->codec->bit_rate = s->bit_rate;
st->start_time = ts->cur_pcr;
av_log(ts->stream, AV_LOG_TRACE, "start=%0.3f pcr=%0.3f incr=%d\n",
......
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