[vlc-commits] mp4:libmp4mux: no need to init the es_format_t

Steve Lhomme git at videolan.org
Fri Jul 21 13:54:46 CEST 2017


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Mon Jul 17 16:33:17 2017 +0200| [1245ae2f01d1b60b1541305d559175bf3c5e51d3] | committer: Jean-Baptiste Kempf

mp4:libmp4mux: no need to init the es_format_t

It is always overridden right after the init.
That saves an unnecessary es_format_Clean each time.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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;
 }
 



More information about the vlc-commits mailing list