Fixed GStreamer encoding pipeline frame drop for most cases.

For several muxers and encoders GStreamer still drops the last frame.