[vlc-commits] modules/codec/omxil/mediacodec.c: add MPEG2 support

Alexandre Janniaux git at videolan.org
Wed Feb 21 08:47:30 CET 2018


vlc | branch: master | Alexandre Janniaux <alexandre.janniaux at gmail.com> | Tue Feb 20 17:36:15 2018 +0100| [5b36000c03b55f33d855ef66f8651a8b70ca9436] | committer: Thomas Guillem

modules/codec/omxil/mediacodec.c: add MPEG2 support

Add MPEG2 support with Mediacodec on Android.

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5b36000c03b55f33d855ef66f8651a8b70ca9436
---

 modules/codec/omxil/mediacodec.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/modules/codec/omxil/mediacodec.c b/modules/codec/omxil/mediacodec.c
index 44829f73b3..6a940449ac 100644
--- a/modules/codec/omxil/mediacodec.c
+++ b/modules/codec/omxil/mediacodec.c
@@ -580,16 +580,14 @@ static int OpenDecoder(vlc_object_t *p_this, pf_MediaCodecApi_init pf_init)
             break;
         case VLC_CODEC_H263: mime = "video/3gpp"; break;
         case VLC_CODEC_MP4V: mime = "video/mp4v-es"; break;
+        case VLC_CODEC_MPGV:
+        case VLC_CODEC_MP2V:
+            mime = "video/mpeg2";
+            break;
         case VLC_CODEC_WMV3: mime = "video/x-ms-wmv"; break;
         case VLC_CODEC_VC1:  mime = "video/wvc1"; break;
         case VLC_CODEC_VP8:  mime = "video/x-vnd.on2.vp8"; break;
         case VLC_CODEC_VP9:  mime = "video/x-vnd.on2.vp9"; break;
-        /* FIXME: mpeg2 is disabled: sar num/den can't be updated from
-         * MediaCodec. Use avcodec instead that will update it. The proper
-         * solution is to update sar from a mpeg2 packetizer.
-         *
-         * case VLC_CODEC_MPGV: mime = "video/mpeg2"; break;
-         */
         }
     }
     else



More information about the vlc-commits mailing list