Bug 1143339: Part3. FFmpeg decoder can play video/mp4 mimetype. r=edwin
authorJean-Yves Avenard <jyavenard@mozilla.com>
Mon, 16 Mar 2015 08:49:19 +1100
changeset 233881 ce5ecfd4fe1c9672fbba8002945fb2d42e1829d0
parent 233880 1c8639568d8b2bb5a6b2e907c300112942bfb07f
child 233882 d5bf133711c4fc9ea3d75e883d1b320e0fb99db6
push id28426
push usercbook@mozilla.com
push dateTue, 17 Mar 2015 10:46:54 +0000
treeherdermozilla-central@008b3f65a7e0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersedwin
bugs1143339
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1143339: Part3. FFmpeg decoder can play video/mp4 mimetype. r=edwin
dom/media/fmp4/ffmpeg/FFmpegH264Decoder.cpp
--- a/dom/media/fmp4/ffmpeg/FFmpegH264Decoder.cpp
+++ b/dom/media/fmp4/ffmpeg/FFmpegH264Decoder.cpp
@@ -284,17 +284,17 @@ FFmpegH264Decoder<LIBAV_VER>::Flush()
 FFmpegH264Decoder<LIBAV_VER>::~FFmpegH264Decoder()
 {
   MOZ_COUNT_DTOR(FFmpegH264Decoder);
 }
 
 AVCodecID
 FFmpegH264Decoder<LIBAV_VER>::GetCodecId(const char* aMimeType)
 {
-  if (!strcmp(aMimeType, "video/avc")) {
+  if (!strcmp(aMimeType, "video/avc") || !strcmp(aMimeType, "video/mp4")) {
     return AV_CODEC_ID_H264;
   }
 
   if (!strcmp(aMimeType, "video/x-vnd.on2.vp6")) {
     return AV_CODEC_ID_VP6F;
   }
 
   return AV_CODEC_ID_NONE;