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

Commit c80218a9 authored by James Dong's avatar James Dong
Browse files

Added damr box for AMR (NB and WB) sample entry

- Some players, like QT, sometimes are picky about the missing sample entry

Change-Id: Ia32d78e48ac9fd8af8285dbc67f0d69142ba98b4
parent 31b5d548
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -1615,6 +1615,16 @@ void MPEG4Writer::Track::writeTrackHeader(
                        mOwner->write(kData2, sizeof(kData2));
                        mOwner->write(kData2, sizeof(kData2));


                    mOwner->endBox();  // esds
                    mOwner->endBox();  // esds
                  } else if (!strcasecmp(MEDIA_MIMETYPE_AUDIO_AMR_NB, mime) ||
                             !strcasecmp(MEDIA_MIMETYPE_AUDIO_AMR_WB, mime)) {
                    // 3gpp2 Spec AMRSampleEntry fields
                    mOwner->beginBox("damr");
                      mOwner->writeCString("   ");  // vendor: 4 bytes
                      mOwner->writeInt8(0);         // decoder version
                      mOwner->writeInt16(0x83FF);   // mode set: all enabled
                      mOwner->writeInt8(0);         // mode change period
                      mOwner->writeInt8(1);         // frames per sample
                    mOwner->endBox();
                  }
                  }
                mOwner->endBox();
                mOwner->endBox();
            } else {
            } else {