avviddec: Allocates twice as many output frames as required
This can be seen with current master and a minimalist h264 pipeline: GST_DEBUG=2,*libav*:8 gst-launch-1.0 ... ! avdec_h264 ! fakesink
The problem is that for every frame both gst_ffmpegviddec_get_buffer2()
and get_output_buffer()
get called. Both allocating output frames.
-
gst_ffmpegviddec_get_buffer2()
is what ffmpeg calls when it needs to allocate buffers -
get_output_buffer()
is meant to be a fallback if ever we don't get that allocated buffer in the returned opaque
Problem is ... we never get a valid buffer in the returned opaque :(