Skip to content

Commit

Permalink
do not override subsession_id if explicitly set
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanlf committed Dec 21, 2023
1 parent c506ebd commit 4132c86
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion include/gpac/filters.h
Original file line number Diff line number Diff line change
Expand Up @@ -3276,12 +3276,14 @@ If sourceIDs are used on destination filter, subsession and source IDs are igno
If filters do not have the same subsession ID, they cannot link to each
If filters do not have the same sourceID, they cannot link to each other except if destination is a sink
Function does nothing if the filter is allready assigned to a subsession
\note In non-implicit mode, subsession tagging must be done through filter option :FS=
\param filter target filter
\param subsession_id subsession identifier
\param source_id subsession identifier
\return error if any
\return error if any, GF_OK or the value of the already assigned subsession ID
*/
GF_Err gf_filter_tag_subsession(GF_Filter *filter, u32 subsession_id, u32 source_id);

Expand Down
2 changes: 2 additions & 0 deletions src/filter_core/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -5286,6 +5286,8 @@ GF_Err gf_filter_tag_subsession(GF_Filter *filter, u32 subsession_id, u32 source
if (!filter) return GF_BAD_PARAM;
//ignored in non implicit mode
if (! (filter->session->flags & GF_FS_FLAG_IMPLICIT_MODE)) return GF_OK;
//subsession explicitly assigned
if (filter->subsession_id) return filter->subsession_id;
filter->subsession_id = subsession_id;
if (gf_filter_is_sink(filter))
filter->subsource_id = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/os_config_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1422,7 +1422,7 @@ GF_GPACArg GPAC_Args[] = {
"- m=N: set rule mode - `N` can be `r` for reception only (default), `w` for send only or `rw` for both\n"
"- s=N: set packet start range to `N`\n"
"- e=N: set packet end range to `N` (only used for `r` and `f` rules)\n"
"- n=N: set number of packets to drop to `N`, 0 or 1 means single packet\n"
"- n=N: set number of packets to drop to `N` - not set, 0 or 1 means single packet\n"
"- r=N: random drop one packet every `N`\n"
"- f=N: drop first packet every `N`\n"
"- p=P: local port number to filter, if not set the rule applies to all packets\n"
Expand Down

0 comments on commit 4132c86

Please sign in to comment.