Fix audio and huge memory leak using consumer producer. (SF-221)

This would occur when the output frame rate is less than the project
frame rate. The problem was that the avformat producer would not produce
enough samples to fulfill the consumer producer's request. Then, the
consumer producer would skip frames to reduce frame rate. That resulted
in some audio being skipped and choppy output. This also caused a
massive audio underflow in the avformat consumer. Next, while the
avformat consumer is trying maintain audio/video sync, it would
accumulate video frames in its queue causing the memory utilization to
rise quickly.