<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Commit <a moz-do-not-send="true"
href="https://github.com/FFmpeg/FFmpeg/commit/3f9137c57d2344d7613f134128235c18edcede95">3f9137c
      </a>changed how avfilter behaved in my application and I was
      wondering if it is a FFmpeg bug, my bug, or intended behavior?</p>
    <p>My application reads in media with avfilter/avcodec, resizes it
      with swscale, applies an overlay with avfilter, swscales it again,
      then encodes it with libjpeg-turbo. If I don't set AVFrame::pts to
      AV_NOPTS_VALUE before giving it to avfilter, I get a <a
        moz-do-not-send="true"
href="https://abex.sauville.org/ffmpeg_garbage/garbage%20at%20bottom.jpg">blank
        frame with some garbage at the bottom</a>. Additionally this
      only happens with <a moz-do-not-send="true"
        href="https://abex.sauville.org/ffmpeg_garbage/rawpng.png">some
        PNG inputs</a>(afaik, haven't tried many formats). This does not
      happen with h264 in a mp4, or with a <a moz-do-not-send="true"
        href="https://abex.sauville.org/ffmpeg_garbage/png_in_mp3.mp3">PNG
        in a mp3</a>. In this configuration only one frame goes through
      the filter before it is destroyed. <br>
    </p>
    <p>Relevant code in my application is here:<a moz-do-not-send="true"
href="https://bitbucket.org/Abex/yumeko/src/3960c8e03f2e69a329b1074ba6bda7fb2b08c112/thumblink/mutators/thumbnailer/base.go?fileviewer=file-view-default#base.go-393"><br>
        base.go</a><br>
      <a moz-do-not-send="true"
href="https://bitbucket.org/Abex/yumeko/src/3960c8e03f2e69a329b1074ba6bda7fb2b08c112/ffmpeg/format.h?fileviewer=file-view-default">format.h</a><br>
      <a moz-do-not-send="true"
href="https://bitbucket.org/Abex/yumeko/src/3960c8e03f2e69a329b1074ba6bda7fb2b08c112/ffmpeg/format.go?at=master&fileviewer=file-view-default">format.go</a><br>
    </p>
    <p>Unfortunately this code does not lend itself to debugging very
      well, due to tight integration, lack of testing, and FFI borders,
      so if this does look like a bug, I can try to get a smaller repro
      if that would help. <br>
    </p>
    <br>
  </body>
</html>