Skip to content

amfencoder: always empty the queue when pushing output samples

Jakub Adam requested to merge xhaakon/gstreamer:amflatency into main

gst_amf_encoder_try_output() pushes at most one output buffer downstream although more may be ready. As a consequence, output samples will keep queueing up in AMFComponent whenever QueryOutput() returns AMF_REPEAT (and do_wait is FALSE). This has negative impact on latency when the video being encoded is a live stream.

In order to avoid it, always retrieve and push all samples available in AMFComponent's output queue at once.

Merge request reports