mediacodec: try to return an output frame if we failed to get an available input buffer.

Previously we would only return one frame even if multiple output
frames were available, dropping all but the last one, while waiting
for a free input buffer. Instead return the first output buffer
and don't consume the input buffer at all in that case.

Signed-off-by: Martin Storsjö <martin@martin.st>