summaryrefslogtreecommitdiffstats
path: root/include/media/stagefright/SkipCutBuffer.h
Commit message (Collapse)AuthorAgeFilesLines
* Move overflow checks into SkipCutBufferMarco Nelissen2015-12-181-3/+4
| | | | | | | | | | | | Previously SkipCutBuffer would check its input parameters to ensure they were sane, however since bogus values might be the result of overflows, and overflow protection was recently turned on for libstagefright, the compiler's overflow checks were performed before SkipCutBuffer's, resulting in abort rather than just ignoring the bogus values. Moving the multiplication by framesize into SkipCutBuffer fixes this. Change-Id: I1ad6744bb045a5212701bbf6ee44eecb5f318210
* Fully reset SkipCutBuffer state in clear()Marco Nelissen2013-09-181-0/+1
| | | | | | b/8543366 Change-Id: I1b90d56ba3d672fd12b4ee91fa9ba24c665126ed
* Fix mono gapless playback for decoders that output stereoMarco Nelissen2012-04-301-2/+4
| | | | | | | | | | | | | The old AAC decoder always outputs stereo, even for mono source material, so we need to use the number of channels of the output when calculating the number of bytes to skip, not the number of channels in the source. This makes OMXCodec skip the right amount of data, and prevents NuPlayer from writing half a frame and then asserting when the AudioSink doesn't accept it. Also move use of the SkipCutBuffer from NuPlayer to ACodec, so that it also works when using the new Java APIs, and make SkipCutBuffer derive from RefBase. b/774846 Change-Id: I34df9fea3e6730617eae559afaa556f4085ef0a0
* Add ABuffer support to SkipCutBufferMarco Nelissen2012-03-291-2/+3
| | | | | | | | Add support for ABuffer to SkipCutBuffer, and make it (re)allocate an appropriately sized buffer when needed, rather then relying on the caller to tell it ahead of time how big the buffers are going to be. Change-Id: I8b5c9ba5dd2fc13ef8870b7d4fe93a1bfdc7a626
* Support gapless playback for mp3 and m4aMarco Nelissen2012-03-221-0/+58
Gapless playback for appropriately tagged mp3 and m4a files. Currently this is implemented in OMXCodec, which most players use, but should be easy to support in other players as well by using the SkipCutBuffer utility class. Change-Id: I748c669adc1cfbe5ee9a7dea2fad945d48882551