@@ -1027,7 +1027,7 @@ static GF_Err mp4_mux_setup_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_tr
10271027 gf_filter_pid_set_property (ctx -> opid , GF_PROP_PID_STREAM_TYPE , & PROP_UINT (GF_STREAM_FILE ) );
10281028
10291029 mux_assign_mime_file_ext (pid , ctx -> opid , ISOM_FILE_EXT , ISOM_FILE_MIME , NULL );
1030-
1030+
10311031 gf_filter_pid_set_property (ctx -> opid , GF_PROP_PID_DASH_MODE , NULL );
10321032 //we dispatch timing in milliseconds
10331033 gf_filter_pid_set_property (ctx -> opid , GF_PROP_PID_TIMESCALE , & PROP_UINT (1000 ));
@@ -1080,7 +1080,7 @@ static GF_Err mp4_mux_setup_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_tr
10801080 GF_FilterEvent evt ;
10811081 GF_SAFEALLOC (tkw , TrackWriter );
10821082 if (!tkw ) return GF_OUT_OF_MEM ;
1083-
1083+
10841084 gf_list_add (ctx -> tracks , tkw );
10851085 tkw -> ipid = pid ;
10861086 tkw -> fake_track = !is_true_pid ;
@@ -2615,7 +2615,7 @@ static GF_Err mp4_mux_setup_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_tr
26152615 return e ;
26162616 }
26172617 }
2618-
2618+
26192619 if (xps_inband ) {
26202620 //this will cleanup all PS in avcC / svcC
26212621 gf_isom_avc_set_inband_config (ctx -> file , tkw -> track_num , tkw -> stsd_idx , (xps_inband == XPS_IB_BOTH ) ? GF_TRUE : GF_FALSE );
@@ -3213,7 +3213,7 @@ static GF_Err mp4_mux_setup_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_tr
32133213 GF_LOG (GF_LOG_WARNING , GF_LOG_CONTAINER , ("[MP4Mux] muxing unknown codec ID %s, using generic sample entry with 4CC \"%s\"\n" , gf_codecid_name (codec_id ), gf_4cc_to_str (m_subtype ) ));
32143214 }
32153215 }
3216-
3216+
32173217 e = gf_isom_new_generic_sample_description (ctx -> file , tkw -> track_num , (char * )src_url , NULL , & udesc , & tkw -> stsd_idx );
32183218 if (gpac_meta_dsi ) gf_free (gpac_meta_dsi );
32193219
@@ -3762,7 +3762,7 @@ static GF_Err mp4_mux_setup_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_tr
37623762 if (add_chap ) {
37633763 gf_isom_add_chapter (ctx -> file , 0 , start_time , p2 -> value .string_list .vals [j ]);
37643764 }
3765- if (add_tk ) {
3765+ if (add_tk && p2 -> value . string_list . vals [ j ] ) {
37663766 GF_TextSample tx ;
37673767 memset (& tx , 0 , sizeof (tx ));
37683768 tx .text = p2 -> value .string_list .vals [j ];
@@ -4363,7 +4363,7 @@ static GF_Err mp4_mux_cenc_update(GF_MP4MuxCtx *ctx, TrackWriter *tkw, GF_Filter
43634363 tkw -> has_seig = GF_TRUE ;
43644364 }
43654365 } else {
4366-
4366+
43674367 e = GF_OK ;
43684368 //multikey ALWAYS uses seig
43694369 if (tkw -> cenc_ki -> value .data .ptr [0 ])
@@ -5014,7 +5014,7 @@ static GF_Err mp4_mux_process_sample(GF_MP4MuxCtx *ctx, TrackWriter *tkw, GF_Fil
50145014 tkw -> gdr_type = sap_type ;
50155015 }
50165016 }
5017-
5017+
50185018 subs = gf_filter_pck_get_property (pck , GF_PROP_PCK_SUBS );
50195019 if (subs ) {
50205020 //if no AUDelim nal and inband header injection, push new subsample
@@ -7107,7 +7107,7 @@ static void mp4_mux_config_timing(GF_MP4MuxCtx *ctx)
71077107 if (blocking_refs && has_ready ) {
71087108 GF_LOG (GF_LOG_WARNING , GF_LOG_CONTAINER , ("[MP4Mux] Blocking input packets present, aborting initial timing sync\n" ));
71097109 }
7110- //this may be quite long until we have a packet in case input pid is video encoding
7110+ //this may be quite long until we have a packet in case input pid is video encoding
71117111 else if (ctx -> config_retry_start && (gf_sys_clock () - ctx -> config_retry_start > 10000 )) {
71127112 GF_LOG (GF_LOG_WARNING , GF_LOG_CONTAINER , ("[MP4Mux] No input packets present on one or more inputs for more than 10s, aborting initial timing sync\n" ));
71137113 } else {
@@ -7908,7 +7908,7 @@ static GF_Err mp4_mux_done(GF_MP4MuxCtx *ctx, Bool is_final)
79087908 }
79097909
79107910 gf_isom_purge_track_reference (ctx -> file , tkw -> track_num );
7911-
7911+
79127912 if (ctx -> importer && ctx -> dur .num && ctx -> dur .den ) {
79137913 u64 mdur = gf_isom_get_media_duration (ctx -> file , tkw -> track_num );
79147914 u64 pdur = gf_isom_get_track_duration (ctx -> file , tkw -> track_num );
@@ -8392,4 +8392,3 @@ const GF_FilterRegister *mp4mx_register(GF_FilterSession *session)
83928392 return NULL ;
83938393}
83948394#endif // GPAC_DISABLE_ISOM_WRITE
8395-
0 commit comments