Skip to content

Commit

Permalink
updated doc for LATM decoder config insertion frequency and made sure…
Browse files Browse the repository at this point in the history
… first AAC+LATM sent has a decoder config
  • Loading branch information
jeanlf committed Jan 17, 2023
1 parent a6c21ad commit 7e2cb01
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 6 deletions.
9 changes: 8 additions & 1 deletion share/doc/man/gpac-filters.1
Expand Up @@ -4729,6 +4729,13 @@ The filter will look for property M2TSRA set on the input stream.
The value can either be a 4CC or a string, indicating the MP2G-2 TS Registration tag for unknown media types.
.br

.br
.SH Notes
.LP
.br
In LATM mux mode, the decoder configuration is inserted at the given .I repeat_rate or CarouselRate PID property if defined.
.br

.br
.SH Options (expert):
.LP
Expand Down Expand Up @@ -11118,7 +11125,7 @@ Authors: GPAC developers, see git repo history (-log)
.br
For bug reports, feature requests, more information and source code, visit https://github.com/gpac/gpac
.br
build: 2.3-DEV-rev21-ga62df36f6-master
build: 2.3-DEV-rev29-ga6c21ad14-master
.br
Copyright: (c) 2000-2023 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
.br
Expand Down
2 changes: 1 addition & 1 deletion share/doc/man/gpac.1
Expand Up @@ -4960,7 +4960,7 @@ Authors: GPAC developers, see git repo history (-log)
.br
For bug reports, feature requests, more information and source code, visit https://github.com/gpac/gpac
.br
build: 2.3-DEV-rev21-ga62df36f6-master
build: 2.3-DEV-rev29-ga6c21ad14-master
.br
Copyright: (c) 2000-2023 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
.br
Expand Down
2 changes: 1 addition & 1 deletion share/doc/man/mp4box.1
Expand Up @@ -2924,7 +2924,7 @@ Authors: GPAC developers, see git repo history (-log)
.br
For bug reports, feature requests, more information and source code, visit https://github.com/gpac/gpac
.br
build: 2.3-DEV-rev21-ga62df36f6-master
build: 2.3-DEV-rev29-ga6c21ad14-master
.br
Copyright: (c) 2000-2023 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
.br
Expand Down
3 changes: 3 additions & 0 deletions src/filters/mux_ts.c
Expand Up @@ -2096,6 +2096,9 @@ GF_FilterRegister TSMuxRegister = {
"The filter watches the property `FileNumber` on incoming packets to create new files, or new segments in DASH mode.\n"
"The filter will look for property `M2TSRA` set on the input stream.\n"
"The value can either be a 4CC or a string, indicating the MP2G-2 TS Registration tag for unknown media types.\n"
"\n"
"# Notes\n"
"In LATM mux mode, the decoder configuration is inserted at the given [-repeat_rate]() or `CarouselRate` PID property if defined.\n"
)
.private_size = sizeof(GF_TSMuxCtx),
.args = TSMuxArgs,
Expand Down
4 changes: 2 additions & 2 deletions src/media_tools/m2ts_mux.c
Expand Up @@ -1504,11 +1504,11 @@ static u32 gf_m2ts_stream_process_pes(GF_M2TS_Mux *muxer, GF_M2TS_Mux_Stream *st

/*same mux config = 0 (refresh aac config)*/
stream_time_ms = (u32) (stream->time.sec*1000 + stream->time.nanosec/1000000);
if (stream->ifce->decoder_config && (stream->latm_last_aac_time + stream->refresh_rate_ms < stream_time_ms)) {
if (stream->ifce->decoder_config && (!stream_time_ms || (stream->latm_last_aac_time + stream->refresh_rate_ms < stream_time_ms-1))) {
#ifndef GPAC_DISABLE_AV_PARSERS
GF_M4ADecSpecInfo cfg;
#endif
stream->latm_last_aac_time = stream_time_ms;
stream->latm_last_aac_time = stream_time_ms+1;

gf_bs_write_int(bs, 0, 1);
/*mux config */
Expand Down

0 comments on commit 7e2cb01

Please sign in to comment.