<html>
    <head>
      <base href="https://bugzilla.libav.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - mkv_write_flush_packet returning wrong value"
   href="https://bugzilla.libav.org/show_bug.cgi?id=865">865</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>mkv_write_flush_packet returning wrong value
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Libav
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>git HEAD
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>major
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>---
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>libavformat
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>bugzilla@libav.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>armin.trattnig@bitmovin.net
          </td>
        </tr></table>
      <p>
        <div>
        <pre>mkv_write_flush_packet in libavformat/matroskaenc.c returns 0 after flushing. 
This function is called inside av_write_frame, when AVPacket is NULL and the
oformat is flushable. av_write_frame return definition says that it will retrun
"1 if flushed and there is no more data to flush". The function
mkv_write_flush_packet is never able to return 1, it only returns 0 after
flushing. 
Since flushing looks something like this:
while (av_write_frame(this->avOutputFormatContext, NULL) == 0) { }

and when the oformat is matroska, this will result in an endless loop.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are watching all bug changes.</li>
      </ul>
    </body>
</html>