[Android] [PATCH] disable MediaCodec with ".ts" files for all android versions

Martin Storsjö martin at martin.st
Tue Jan 20 07:36:30 CET 2015


On Tue, 20 Jan 2015, Jean-Baptiste Kempf wrote:

> On 20 Jan, Martin Storsjö wrote :
>> On Tue, 20 Jan 2015, Jean-Baptiste Kempf wrote:
>>
>>> On 19 Jan, Thomas Guillem wrote :
>>>> ---
>>>> vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 4 ++--
>>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
>>>> index dd56f57..5d6410b 100644
>>>> --- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
>>>> +++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
>>>> @@ -2339,9 +2339,9 @@ public class VideoPlayerActivity extends ActionBarActivity implements IVideoPlay
>>>>         if(mLibVLC == null)
>>>>             return;
>>>>
>>>> -        /* WARNING: hack to avoid a crash in mediacodec on KitKat.
>>>> +        /* WARNING: hack to avoid a crash in mediacodec.
>>>>          * Disable hardware acceleration if the media has a ts extension. */
>>>> -        if (mLocation != null && LibVlcUtil.isKitKatOrLater()) {
>>>> +        if (mLocation != null) {
>>>
>>> That is sad.
>>
>> Is this hack in order to avoid the issues with interlaced videos, or what
>> was the actual issue here?
>
> Yes.

Oh.

I was about to ask whether those were fixed in lollipop as they should, 
but then I remembered, the fix in lollipop was only for the crash - now it 
shouldn't crash any longer (it should only throw an exception and fail 
more nicely).

Thomas, is this what you're seeing, or does it still crash?

(Then whether VLC can fall back nicely to SW decoder in case the HW 
decoder fails halfway is of course a different issue.) And the third issue 
would of course be to have qualcomm decoders not fail on interlaced...

// Martin


More information about the Android mailing list