<div dir="ltr"><div>I am building transcoding tool with libav that uses libavformat mpegts muxer, and after 24 hours roughly where pts and dts should reset i reset pts and dts to 0 (I am incrementing PTS/DTS myself) and muxer starts giving me EINVAL. Is there some mechanism how it should be handled in libav? <br></div><div>Also i add these flags:</div><div><br></div><div>fmtCtx->flags |= AVFMT_FLAG_FLUSH_PACKETS;<br>fmtCtx->flags |= AVFMT_FLAG_NOBUFFER;<br>fmtCtx->avoid_negative_ts = AVFMT_AVOID_NEG_TS_MAKE_ZERO;</div><div><br></div><div>av_opt_set(fmtCtx->priv_data, "mpegts_flags", "+initial_discontinuity+resend_headers+system_b", 0);</div></div>