[vlc-devel] [PATCH 11/18] mp4:libmp4mux: no need to init the es_format_t
Steve Lhomme
robux4 at videolabs.io
Mon Jul 17 16:33:17 CEST 2017
It is always overridden right after the init.
That saves an unnecessary es_format_Clean each time.
---
modules/demux/smooth/playlist/ForgedInitSegment.cpp | 2 +-
modules/mux/mp4/libmp4mux.c | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/modules/demux/smooth/playlist/ForgedInitSegment.cpp b/modules/demux/smooth/playlist/ForgedInitSegment.cpp
index 53ea627880..258bf26756 100644
--- a/modules/demux/smooth/playlist/ForgedInitSegment.cpp
+++ b/modules/demux/smooth/playlist/ForgedInitSegment.cpp
@@ -215,7 +215,7 @@ block_t * ForgedInitSegment::buildMoovBox()
trackinfo.i_trex_default_length = 1;
trackinfo.i_trex_default_size = 1;
- es_format_Change(&trackinfo.fmt, es_type, vlc_fourcc_GetCodec(es_type, fourcc));
+ es_format_Init(&trackinfo.fmt, es_type, vlc_fourcc_GetCodec(es_type, fourcc));
trackinfo.fmt.i_original_fourcc = fourcc;
switch(es_type)
{
diff --git a/modules/mux/mp4/libmp4mux.c b/modules/mux/mp4/libmp4mux.c
index ec7a8b2279..3b3397c19d 100644
--- a/modules/mux/mp4/libmp4mux.c
+++ b/modules/mux/mp4/libmp4mux.c
@@ -50,8 +50,6 @@ bool mp4mux_trackinfo_Init(mp4mux_trackinfo_t *p_stream, unsigned i_id,
if(!p_stream->entry)
return false;
- es_format_Init(&p_stream->fmt, UNKNOWN_ES, 0);
-
return true;
}
--
2.12.1
More information about the vlc-devel
mailing list