Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9bf32f06 authored by Chong Zhang's avatar Chong Zhang
Browse files

ATSParser: treat stream type 0x83 as TrueHD AC3

Bug: 16668055
Change-Id: I11fd3f795bbb50113e1a1e28e682edd76f11e146
parent a6d28be0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -803,7 +803,7 @@ const char *MediaCodecList::getCodecName(size_t index) const {

bool MediaCodecList::isEncoder(size_t index) const {
    if (index >= mCodecInfos.size()) {
        return NULL;
        return false;
    }

    const CodecInfo &info = mCodecInfos.itemAt(index);
@@ -813,7 +813,7 @@ bool MediaCodecList::isEncoder(size_t index) const {
bool MediaCodecList::codecHasQuirk(
        size_t index, const char *quirkName) const {
    if (index >= mCodecInfos.size()) {
        return NULL;
        return false;
    }

    const CodecInfo &info = mCodecInfos.itemAt(index);
+2 −6
Original line number Diff line number Diff line
@@ -503,11 +503,7 @@ ATSParser::Stream::Stream(
                    ElementaryStreamQueue::MPEG4_VIDEO);
            break;

        case STREAMTYPE_PCM_AUDIO:
            mQueue = new ElementaryStreamQueue(
                    ElementaryStreamQueue::PCM_AUDIO);
            break;

        case STREAMTYPE_LPCM_AC3:
        case STREAMTYPE_AC3:
            mQueue = new ElementaryStreamQueue(
                    ElementaryStreamQueue::AC3);
@@ -622,7 +618,7 @@ bool ATSParser::Stream::isAudio() const {
        case STREAMTYPE_MPEG1_AUDIO:
        case STREAMTYPE_MPEG2_AUDIO:
        case STREAMTYPE_MPEG2_AUDIO_ADTS:
        case STREAMTYPE_PCM_AUDIO:
        case STREAMTYPE_LPCM_AC3:
        case STREAMTYPE_AC3:
            return true;

+3 −1
Original line number Diff line number Diff line
@@ -93,7 +93,9 @@ struct ATSParser : public RefBase {
        // From ATSC A/53 Part 3:2009, 6.7.1
        STREAMTYPE_AC3                  = 0x81,

        STREAMTYPE_PCM_AUDIO            = 0x83,
        // Stream type 0x83 is non-standard,
        // it could be LPCM or TrueHD AC3
        STREAMTYPE_LPCM_AC3             = 0x83,
    };

protected: