Improve A/V sync when starting/stopping/refreshing.
Improve A/V sync when starting/stopping/refreshing.

When stopping, the consmer would throw away frames that were in the video queue
rather than provide them to the application.

Additionally, in some cases, while stopping, the consumer thread would output a
newer frame and then the video thread would output an older frame - causing
frames to be provided out of order.

Also, when refreshing, frequently two frames would be displayed rather than
one.

The fundamental principle of this change is that if the audio was displayed for
a frame, the video should also be provided for the display - even when
stopping.

wideioltd/mlt,siddharudh/mlt,anba8005/mlt,siddharudh/mlt,xzhavilla/mlt,xzhavilla/mlt,siddharudh/mlt,zzhhui/mlt,mltframework/mlt,siddharudh/mlt,j-b-m/mlt,mltframework/mlt,mltframework/mlt,xzhavilla/mlt,xzhavilla/mlt,anba8005/mlt,mltframework/mlt,wideioltd/mlt,zzhhui/mlt,zzhhui/mlt,wideioltd/mlt,zzhhui/mlt,mltframework/mlt,wideioltd/mlt,zzhhui/mlt,wideioltd/mlt,wideioltd/mlt,j-b-m/mlt,j-b-m/mlt,zzhhui/mlt,j-b-m/mlt,xzhavilla/mlt,j-b-m/mlt,j-b-m/mlt,mltframework/mlt,wideioltd/mlt,anba8005/mlt,siddharudh/mlt,xzhavilla/mlt,anba8005/mlt,zzhhui/mlt,siddharudh/mlt,zzhhui/mlt,anba8005/mlt,zzhhui/mlt,xzhavilla/mlt,mltframework/mlt,siddharudh/mlt,wideioltd/mlt,mltframework/mlt,j-b-m/mlt,j-b-m/mlt,anba8005/mlt,mltframework/mlt,j-b-m/mlt,anba8005/mlt,j-b-m/mlt,siddharudh/mlt,mltframework/mlt,siddharudh/mlt,anba8005/mlt,xzhavilla/mlt,wideioltd/mlt,anba8005/mlt,xzhavilla/mlt