<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 2018-11-21 3:13 p.m., Jaka Bac
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAPQ1XRG_KJPr1w_aeuJf4WX=LC7OEKDFoqB4jt5cgtFh1FzQpA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">
          <div class="gmail_quote">
            <div dir="ltr">On Wed, 21 Nov 2018 at 20:47, drwho <<a
                href="mailto:drwho@infidigm.net" moz-do-not-send="true">drwho@infidigm.net</a>>
              wrote:<br>
            </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">Hello,<br>
              <br>
              The audio decoder example below fails to decode any file
              I've tried <br>
              (mp3, opus, wav).....<br>
              <br>
              [mp2 @ 0x55d075c3d780] Header missing<br>
              Error submitting the packet to the decoder<br>
              <br>
              <a
href="https://libav.org/documentation/doxygen/master/decode__audio_8c_source.html"
                rel="noreferrer" target="_blank" moz-do-not-send="true">https://libav.org/documentation/doxygen/master/decode__audio_8c_source.html</a><br>
              <br>
              Jon<br>
              <br>
            </blockquote>
            <div><br>
            </div>
            <div>Hello,</div>
            <div><br>
            </div>
            <div>The audio decoding example specifically uses the MP2
              audio codec to decode the audio.</div>
            <div>It does this:</div>
            codec = avcodec_find_decoder(AV_CODEC_ID_MP2); </div>
        </div>
      </div>
    </blockquote>
    <p>Hi Jaka,</p>
    <p>I've tried changing it to <br>
    </p>
    <p>AV_CODEC_ID_MP3</p>
    <p>error = [mp3 @ 0x56136ad2f780] Header missing<br>
      <br>
    </p>
    <p>AV_CODEC_ID_OPUS</p>
    <p>error = [opus @ 0x55caa0cb7200] Error parsing Opus packet header.<br>
    </p>
    <p>I've noticed that the packet size is always 0 after calling
      av_parser_parse2().  It would be nice to have an example for
      avcodec_send_packet() and avcodec_receive_frame() that works.</p>
    <p>Jon<br>
    </p>
  </body>
</html>