From: Jan Schmidt Date: Fri, 28 May 2021 20:03:26 +0000 (+1000) Subject: mpegtsmux: Quieten "missed PCR" warnings in VBR mode. X-Git-Tag: 1.19.3~507^2~199 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=30e105561d537f0a00e93ac1fcc126f22b2d5e35;p=platform%2Fupstream%2Fgstreamer.git mpegtsmux: Quieten "missed PCR" warnings in VBR mode. When the muxer is operating in VBR mode, it's kind of expected for now that we might not put the PCR in exactly the right place, because the muxer doesn't schedule packets that way. In that case don't warn constantly about the PCR ending up a few ms off target. Part-of: --- diff --git a/gst/mpegtsmux/tsmux/tsmux.c b/gst/mpegtsmux/tsmux/tsmux.c index 632f9f8..d0e0eb1 100644 --- a/gst/mpegtsmux/tsmux/tsmux.c +++ b/gst/mpegtsmux/tsmux/tsmux.c @@ -1369,7 +1369,7 @@ write_new_pcr (TsMux * mux, TsMuxStream * stream, gint64 cur_pcr, TSMUX_PACKET_FLAG_ADAPTATION | TSMUX_PACKET_FLAG_WRITE_PCR; stream->pi.pcr = cur_pcr; - if (stream->next_pcr != -1 && cur_pcr >= stream->next_pcr) { + if (mux->bitrate && stream->next_pcr != -1 && cur_pcr >= stream->next_pcr) { GST_WARNING ("Writing PCR %" G_GUINT64_FORMAT " missed the target %" G_GUINT64_FORMAT " by %f ms", cur_pcr, stream->next_pcr, (double) (cur_pcr - stream->next_pcr) / 27000.0);