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

Thomas Guillem thomas at gllm.fr
Tue Jan 20 15:09:16 CET 2015


I did this patch to prevent ".ts" for android under KitKat too. I agree,
this should be documented and not targeted for all ".ts".

I have a sample.ts that crashes on some devices. It's OK on Nexus V2
Lollipop, but it crashes on Nexus 9 and Nvidia Tegra Shield Tablet, both
using last Lollipop. The error is following:

Abort message: 'frameworks/av/media/libstagefright/ACodec.cpp:3360
CHECK_LE( rect.nLeft + rect.nWidth - 1,videoDef->nFrameWidth) failed:
4294967295 vs. 0'

This sample is not interlaced, but h264 frames doesn't have PPS/SPS.
So maybe, we shouldn't use MediaCodec if we don't found PPS/SPS ?


On Tue, Jan 20, 2015, at 08:00, Adrien Maglo wrote:
> Le 20/01/2015 07:51, Martin Storsjö a écrit :
> >>> 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...
> >>
> >> And maybe we could detect interlacing, I mean, when parsing the file.
> >
> > Yep, iirc Felix or someone started working on this. The tricky thing is
> > that you only know this once you parse the slice header. You could try
> > to parse these bits in the packetizer somewhere perhaps - I think that
> > was what he started working on.
> 
> I remember the same. He started reading the spec to parse the 
> appropriate flags but he did not complete as he was busy with something 
> else.
> 
> Best regards,
> 
> 
> -- 
> MagSoft
> 
> _______________________________________________
> Android mailing list
> Android at videolan.org
> https://mailman.videolan.org/listinfo/android


More information about the Android mailing list