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>
mediacodec: Simplify the GetOutput function

The loop parameter is always 0 nowadays.

Always call the dequeueOutputBuffer method again if it returned
changed output buffers or changed output format.

Signed-off-by: Martin Storsjö <martin@martin.st>
oss: use SNDCTL_DSP_HALT in Flush() as in Stop() (fixes #9760)

(There does not appear to be much logic there, this might be a driver
issue or confusing documentation.)
EGL: destroy the created EGLSurface on Close()
avcodec: copy correct chroma plane in CopyFromYv12.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
build: support YASM targets

The files must be .asm

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
demux: xiph: support old ffmpeg vorbis headers (fix #8832)
avcodec: ensure valid buffer size for avcodec_fill_audio_frame

avcodec_fill_audio_frame will reject input buffers that are too small,
therefore we cannot call it directly with the input buffer p_aout_buf.

Signed-off-by: Ilkka Ollakka <ileoo@videolan.org>
avcodec: reuse DEFAULT_ALIGN

Signed-off-by: Ilkka Ollakka <ileoo@videolan.org>