[vlc-commits] mux: mp4: fix MPGV in MP4

Francois Cartegnie git at videolan.org
Mon May 4 18:59:18 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon May  4 18:57:47 2015 +0200| [5fdfe6805b5e84515dd363e73d4429b386a6c281] | committer: Francois Cartegnie

mux: mp4: fix MPGV in MP4

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

 modules/demux/mpeg/ps.h |    8 ++++++--
 modules/mux/mp4.c       |    6 ++++++
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mpeg/ps.h b/modules/demux/mpeg/ps.h
index d21a446..07e58dc 100644
--- a/modules/demux/mpeg/ps.h
+++ b/modules/demux/mpeg/ps.h
@@ -192,8 +192,12 @@ static inline int ps_track_fill( ps_track_t *tk, ps_psm_t *p_psm, int i_id, bloc
             {
                 es_format_Init( &tk->fmt, VIDEO_ES, VLC_CODEC_MP4V );
             }
-            else if( i_type == 0x01 ||
-                     i_type == 0x02 )
+            else if( i_type == 0x01 )
+            {
+                es_format_Init( &tk->fmt, VIDEO_ES, VLC_CODEC_MPGV );
+                tk->fmt.i_original_fourcc = VLC_CODEC_MP1V;
+            }
+            else if( i_type == 0x02 )
             {
                 es_format_Init( &tk->fmt, VIDEO_ES, VLC_CODEC_MPGV );
             }
diff --git a/modules/mux/mp4.c b/modules/mux/mp4.c
index 7d8e8fe7..217ef80 100644
--- a/modules/mux/mp4.c
+++ b/modules/mux/mp4.c
@@ -874,6 +874,12 @@ static bo_t *GetESDS(mp4_stream_t *p_stream)
     case VLC_CODEC_MP4V:
         i_object_type_indication = 0x20;
         break;
+    case VLC_CODEC_MPGV:
+        if(p_stream->fmt.i_original_fourcc == VLC_CODEC_MP1V)
+        {
+            i_object_type_indication = 0x6b;
+            break;
+        }
     case VLC_CODEC_MP2V:
         /* MPEG-I=0x6b, MPEG-II = 0x60 -> 0x65 */
         i_object_type_indication = 0x65;



More information about the vlc-commits mailing list