mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
fftools/ffmpeg: use a non-zero default for -readrate_initial_burst
Use it to replace a hack added in 6f20685228
.
This commit is contained in:
parent
2ae16b05d6
commit
007ec49db8
@ -461,7 +461,7 @@ int ifile_get_packet(InputFile *f, AVPacket **pkt)
|
|||||||
for (i = 0; i < f->nb_streams; i++) {
|
for (i = 0; i < f->nb_streams; i++) {
|
||||||
InputStream *ist = f->streams[i];
|
InputStream *ist = f->streams[i];
|
||||||
int64_t stream_ts_offset, pts, now;
|
int64_t stream_ts_offset, pts, now;
|
||||||
if (!ist->nb_packets || (ist->decoding_needed && !ist->got_output)) continue;
|
if (!ist->nb_packets) continue;
|
||||||
stream_ts_offset = FFMAX(ist->first_dts != AV_NOPTS_VALUE ? ist->first_dts : 0, file_start);
|
stream_ts_offset = FFMAX(ist->first_dts != AV_NOPTS_VALUE ? ist->first_dts : 0, file_start);
|
||||||
pts = av_rescale(ist->dts, 1000000, AV_TIME_BASE);
|
pts = av_rescale(ist->dts, 1000000, AV_TIME_BASE);
|
||||||
now = (av_gettime_relative() - ist->start) * scale + stream_ts_offset;
|
now = (av_gettime_relative() - ist->start) * scale + stream_ts_offset;
|
||||||
@ -1240,7 +1240,7 @@ int ifile_open(const OptionsContext *o, const char *filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (f->readrate || f->rate_emu) {
|
if (f->readrate || f->rate_emu) {
|
||||||
d->readrate_initial_burst = o->readrate_initial_burst ? o->readrate_initial_burst : 0.0;
|
d->readrate_initial_burst = o->readrate_initial_burst ? o->readrate_initial_burst : 0.5;
|
||||||
if (d->readrate_initial_burst < 0.0) {
|
if (d->readrate_initial_burst < 0.0) {
|
||||||
av_log(d, AV_LOG_ERROR,
|
av_log(d, AV_LOG_ERROR,
|
||||||
"Option -readrate_initial_burst is %0.3f; it must be non-negative.\n",
|
"Option -readrate_initial_burst is %0.3f; it must be non-negative.\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user