Commit 4c5c1c8f authored by michael's avatar michael

dont butcher start_time in av_estimate_timings_from_bit_rate()

from a patch by neilb suse de


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10140 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 3a915b4b
...@@ -1460,14 +1460,11 @@ static void av_estimate_timings_from_bit_rate(AVFormatContext *ic) ...@@ -1460,14 +1460,11 @@ static void av_estimate_timings_from_bit_rate(AVFormatContext *ic)
for(i = 0; i < ic->nb_streams; i++) { for(i = 0; i < ic->nb_streams; i++) {
st = ic->streams[i]; st = ic->streams[i];
duration= av_rescale(8*filesize, st->time_base.den, ic->bit_rate*(int64_t)st->time_base.num); 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 || if (st->duration == AV_NOPTS_VALUE)
st->duration == AV_NOPTS_VALUE) {
st->start_time = 0;
st->duration = duration; st->duration = duration;
} }
} }
} }
}
} }
#define DURATION_MAX_READ_SIZE 250000 #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