[vlc-devel] [PATCH] mediacodec: fix rotation handling

Zhao Zhili quinkblack at foxmail.com
Wed Aug 8 10:59:01 CEST 2018



On 2018年08月08日 16:23, Thomas Guillem wrote:
> wow, so rotation by mediacodec has been broken since 08d5c0c6418 ?
>
Looks like it is.

And there is a dark corner here. MediaCodec on some device (sadly
I have forgot which one) do rotate by configuring the graphic
system (I guess). It works with SurfaceView, but doesn't work
with SurfaceTexture + OpenGLES. If it can be reproduced on a wide
variety of devices, it may make sense to add an option to disable
rotation by mediacodec.
>
> On Tue, Aug 7, 2018, at 06:47, Zhao Zhili wrote:
>> ---
>>   modules/codec/omxil/mediacodec.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/modules/codec/omxil/mediacodec.c b/modules/codec/omxil/
>> mediacodec.c
>> index 9ee2cf6..68912a8 100644
>> --- a/modules/codec/omxil/mediacodec.c
>> +++ b/modules/codec/omxil/mediacodec.c
>> @@ -705,7 +705,7 @@ static int OpenDecoder(vlc_object_t *p_this,
>> pf_MediaCodecApi_init pf_init)
>>   
>>               if (p_sys->api.b_support_rotation)
>>               {
>> -                switch (p_dec->fmt_out.video.orientation)
>> +                switch (p_dec->fmt_in.video.orientation)
>>                   {
>>                       case ORIENT_ROTATED_90:
>>                           p_sys->video.i_angle = 90;
>> -- 
>> 2.9.5
>>
>>
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel





More information about the vlc-devel mailing list