Commit 9f32041d authored by Neil Brown's avatar Neil Brown Committed by Michael Niedermayer

Do not butcher start_time in av_estimate_timings_from_bit_rate().

from a patch by neilb suse de

Originally committed as revision 10140 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent d6a0906a
......@@ -1460,14 +1460,11 @@ static void av_estimate_timings_from_bit_rate(AVFormatContext *ic)
for(i = 0; i < ic->nb_streams; i++) {
st = ic->streams[i];
duration= av_rescale(8*filesize, st->time_base.den, ic->bit_rate*(int64_t)st->time_base.num);
if (st->start_time == AV_NOPTS_VALUE ||
st->duration == AV_NOPTS_VALUE) {
st->start_time = 0;
if (st->duration == AV_NOPTS_VALUE)
st->duration = duration;
}
}
}
}
}
#define DURATION_MAX_READ_SIZE 250000
......
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