title: Too small ffmpeg rtsp decoding buffer
body: <p>I'm decoding rtsp on Android with ffmpeg, and I quickly see pixelization when the image updates quickly or with a high resolution:</p>
  
  <p><img src="https://i.stack.imgur.com/GwWNh.jpg" alt="working decoded frame"></p>
  
  <p><img src="https://i.stack.imgur.com/gg9Pg.jpg" alt="non working decoded frame"></p>
  
  <p>After googling, I found that it might be correlated to the UDP buffer size. I have then recompiled the ffmpeg library with the following parameters inside ffmpeg/libavformat/udp.c </p>
  
  <pre><code>#define UDP_TX_BUF_SIZE 327680
  #define UDP_MAX_PKT_SIZE 655360
  </code></pre>
  
  <p>It seems to improve but it still starts to fail at some point. Any idea which buffer I should increase and how?</p>