diff mbox series

[FFmpeg-devel,2/4] fftools/ffmpeg: use a non-zero default for -readrate_initial_burst

Message ID 20230502134316.10496-2-anton@khirnov.net
State Accepted
Commit 007ec49db8f3eb9dfc9cfc4f981f3fcda8e3335d
Headers show
Series [FFmpeg-devel,1/4] fftools/ffmpeg: add ability to set a input burst time before readrate is enforced | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov May 2, 2023, 1:43 p.m. UTC
Use it to replace a hack added in 6f206852289.
---
 fftools/ffmpeg_demux.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c
index 37d7649da9..e6f700f6c3 100644
--- a/fftools/ffmpeg_demux.c
+++ b/fftools/ffmpeg_demux.c
@@ -461,7 +461,7 @@  int ifile_get_packet(InputFile *f, AVPacket **pkt)
         for (i = 0; i < f->nb_streams; i++) {
             InputStream *ist = f->streams[i];
             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);
             pts = av_rescale(ist->dts, 1000000, AV_TIME_BASE);
             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) {
-        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) {
             av_log(d, AV_LOG_ERROR,
                    "Option -readrate_initial_burst is %0.3f; it must be non-negative.\n",