[Libav-user] avfilter generates garbage after 3f9137c without setting AVFrame::pts to AV_NOPTS_VALUE

Max Weber mii7303 at gmail.com
Sat Dec 2 09:19:29 EET 2017

Commit 3f9137c 
how avfilter behaved in my application and I was wondering if it is a 
FFmpeg bug, my bug, or intended behavior?

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 blank frame with 
some garbage at the bottom 
Additionally this only happens with some PNG inputs 
<https://abex.sauville.org/ffmpeg_garbage/rawpng.png>(afaik, haven't 
tried many formats). This does not happen with h264 in a mp4, or with a 
PNG in a mp3 <https://abex.sauville.org/ffmpeg_garbage/png_in_mp3.mp3>. 
In this configuration only one frame goes through the filter before it 
is destroyed.

Relevant code in my application is here:

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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20171202/c1c50857/attachment.html>

More information about the Libav-user mailing list