Commit 4125beed authored by Thomas Guillem's avatar Thomas Guillem
Browse files

mediacodec: ensure that surface is released before starting direct rendering

This fixes an error when switching from 2 Es with different codecs.
parent f0128b7c
......@@ -390,7 +390,20 @@ static int StartMediaCodec(decoder_t *p_dec)
if (!p_sys-> && var_InheritBool(p_dec, CFG_PREFIX "dr"))
p_sys-> = AWindowHandler_new(VLC_OBJECT(p_dec));
if ((p_sys-> = AWindowHandler_new(VLC_OBJECT(p_dec))))
/* Direct rendering:
* The surface must be released by the Vout before calling
* start. Request a valid OPAQUE Vout to release any non-OPAQUE
* Vout that will release the surface.
p_dec-> = p_sys->;
p_dec-> = p_sys->;
p_dec->fmt_out.i_codec = VLC_CODEC_ANDROID_OPAQUE;
} = p_sys->;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment