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
diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp
index baf9f4f..9f712c3 100644
--- a/media/libstagefright/MPEG4Writer.cpp
+++ b/media/libstagefright/MPEG4Writer.cpp
@@ -1615,6 +1615,16 @@
                         mOwner->write(kData2, sizeof(kData2));
 
                     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();
             } else {