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

Martin Storsjö martin at martin.st
Tue Jan 20 15:12:51 CET 2015


On Tue, 20 Jan 2015, Thomas Guillem wrote:

> 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 ?

Hmm, so there's some packets before the first SPS/PPS? In that case, we 
could perhaps try not to feed any packets to the MediaCodec decoder until 
the first SPS/PPS (because the decoder won't really be able to do anything 
with it anyway before that)? Or is there something else?

If you can send me the sample I may try to have a look in the android 
internals (perhaps not today but maybe some day), if there's something I 
can fix or write a report out of.

// Martin


More information about the Android mailing list