[vlc-commits] mux: mp4: set correct streamType
Francois Cartegnie
git at videolan.org
Tue Feb 28 17:30:39 CET 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Feb 28 14:05:00 2017 +0100| [2b9a6743a17539fb70d95ed7ae98ba1bd3c093bc] | committer: Francois Cartegnie
mux: mp4: set correct streamType
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2b9a6743a17539fb70d95ed7ae98ba1bd3c093bc
---
modules/mux/mp4/libmp4mux.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/modules/mux/mp4/libmp4mux.c b/modules/mux/mp4/libmp4mux.c
index 16fc644..b0f62f8 100644
--- a/modules/mux/mp4/libmp4mux.c
+++ b/modules/mux/mp4/libmp4mux.c
@@ -294,7 +294,23 @@ static bo_t *GetESDS(mp4mux_trackinfo_t *p_track)
i_object_type_indication = 0x00;
break;
}
- int i_stream_type = p_track->fmt.i_cat == VIDEO_ES ? 0x04 : 0x05;
+
+ uint8_t i_stream_type;
+ switch(p_track->fmt.i_cat)
+ {
+ case VIDEO_ES:
+ i_stream_type = 0x04;
+ break;
+ case AUDIO_ES:
+ i_stream_type = 0x05;
+ break;
+ case SPU_ES:
+ i_stream_type = 0x0D;
+ break;
+ default:
+ i_stream_type = 0x20; /* Private */
+ break;
+ }
bo_add_8 (esds, i_object_type_indication);
bo_add_8 (esds, (i_stream_type << 2) | 1);
More information about the vlc-commits
mailing list