If integral is 0 on any set of measure 1/pi, then the function is 0 a.e.
Let $E = \{f > 0\}$. If $m(E) \ge \dfrac 1\pi$ then $E$ contains a subset $A$ with $m(A) = \dfrac 1\pi$ and necessarily $\displaystyle \int_A f > 0$. Thus $m(E) < \dfrac 1\pi$. Likewise, if $F = \{f < 0\}$, then $m(F) < \dfrac 1\pi$.
Define $G = \{f = 0\}$ and note that $m(G) = 1 - \dfrac 2\pi > \dfrac 1\pi$.
Suppose that $m(E) > 0$. Select $H \subset G$ with $m(H) = \dfrac 1\pi - m(E)$ and observe that $\displaystyle \int_{E \cup H} f > 0$, contrary to hypothesis. Thus $m(E) = 0$. Likewise $m(F) = 0$.