Attempting to generate a live-profile DASH manifest using two xHE-AAC representations that have different frame sizes results in a warning that the segments are not aligned, whereas inspection of the source media files indicates that they are.

Full command that invokes the error:
```
$ /Applications/GPAC.app/Contents/MacOS/MP4Box -dash 5000 -rap -out sintel/live.mpd:dual -profile live -segment-name '$RepresentationID$_$Number%03d$' sintel_12.mp4 sintel_24.mp4
[Dasher] Segments are not aligned across representations: first rep segment duration 4.92263 but new segment duration 6.91955 for the same segment 1
[Dasher] No segment alignment, switching to full profile
[MPD] Generating MPD at time 2022-08-16T10:39:40.544Zsegs)(85.14 %) / MPD 29.26s 98 %.63s 94 %%
[Dasher] End of Period
[Dasher] End of MPD (no more active streams)
```

The media files causing the error are uploaded here:
Representation 1 (12kbit/s): https://www.mediafire.com/file/pm4qg2rmwu868nr/sintel_12.mp4/file
Representation 2 (24kbit/s): https://www.mediafire.com/file/qvrii06n54y0iew/sintel_24.mp4/file

They were generated using a commercial xHE-AAC encoder so unfortunately I cannot give the command that produced them, but using the same build of MP4Box we can see that the random access points are located at exactly the same composition timesamps in both files:

```
$ /Applications/GPAC.app/Contents/MacOS/MP4Box -std -dts sintel_12.mp4 2>/dev/null | awk '$8 == "1" { print $0 }'
Sample 1	DTS 0	CTS 0	339	1	2529	0	0	0	0	0	0	0
Sample 54	DTS 217088	CTS 217088	451	1	10114	0	0	0	0	0	0	0
Sample 108	DTS 438272	CTS 438272	568	1	18061	0	0	0	0	0	0	0
Sample 162	DTS 659456	CTS 659456	518	1	25882	0	0	0	0	0	0	0
Sample 216	DTS 880640	CTS 880640	546	1	33966	0	0	0	0	0	0	0
Sample 270	DTS 1101824	CTS 1101824	559	1	42042	0	0	0	0	0	0	0
Sample 323	DTS 1318912	CTS 1318912	557	1	49770	0	0	0	0	0	0	0

$ /Applications/GPAC.app/Contents/MacOS/MP4Box -std -dts sintel_24.mp4 2>/dev/null | awk '$8 == "1" { print $0 }'
Sample 1	DTS 0	CTS 0	350	1	3821	0	0	0	0	0	0	0
Sample 107	DTS 217088	CTS 217088	516	1	18814	0	0	0	0	0	0	0
Sample 215	DTS 438272	CTS 438272	504	1	34244	0	0	0	0	0	0	0
Sample 323	DTS 659456	CTS 659456	494	1	49724	0	0	0	0	0	0	0
Sample 431	DTS 880640	CTS 880640	504	1	65142	0	0	0	0	0	0	0
Sample 539	DTS 1101824	CTS 1101824	516	1	80491	0	0	0	0	0	0	0
Sample 645	DTS 1318912	CTS 1318912	518	1	95637	0	0	0	0	0	0	0
```

Notice that the "Sample" number is different in each representation because the xHE-AAC encoder uses different frame sizes for different bitrates. Nevertheless, the CTS for each RAP is the same in both files.

Operating system: MacOS 12.5

MP4Box installed from the nightly builds:
```
$ /Applications/GPAC.app/Contents/MacOS/MP4Box -version
MP4Box - GPAC version 2.1-DEV-rev259-gfc4749f9-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io

Please cite our work in your research:
	GPAC Filters: https://doi.org/10.1145/3339825.3394929
	GPAC: https://doi.org/10.1145/1291233.1291452

GPAC Configuration: --extra-cflags=-Wno-deprecated -Wno-shift-negative-value
Features: GPAC_CONFIG_DARWIN GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SSL GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FAAD GPAC_HAS_MAD GPAC_HAS_LIBA52 GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_FFMPEG GPAC_HAS_OPENSVC GPAC_HAS_JP2 GPAC_HAS_OPENHEVC GPAC_HAS_THEORA GPAC_HAS_VORBIS GPAC_HAS_XVID
``` 

Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!

- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95

Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/

[MP4Box] DASH for xHE-AAC wrongly creates unaligned segments
This is a GitHub Issue
repo:gpac
owner:gpac
Title : [MP4Box] DASH for xHE-AAC wrongly creates unaligned segments
Issue date:

--- start body ---
Attempting to generate a live-profile DASH manifest using two xHE-AAC representations that have different frame sizes results in a warning that the segments are not aligned, whereas inspection of the source media files indicates that they are.

Full command that invokes the error:
```
$ /Applications/GPAC.app/Contents/MacOS/MP4Box -dash 5000 -rap -out sintel/live.mpd:dual -profile live -segment-name '$RepresentationID$_$Number%03d$' sintel_12.mp4 sintel_24.mp4
[Dasher] Segments are not aligned across representations: first rep segment duration 4.92263 but new segment duration 6.91955 for the same segment 1
[Dasher] No segment alignment, switching to full profile
[MPD] Generating MPD at time 2022-08-16T10:39:40.544Zsegs)(85.14 %) / MPD 29.26s 98 %.63s 94 %%
[Dasher] End of Period
[Dasher] End of MPD (no more active streams)
```

The media files causing the error are uploaded here:
Representation 1 (12kbit/s): https://www.mediafire.com/file/pm4qg2rmwu868nr/sintel_12.mp4/file
Representation 2 (24kbit/s): https://www.mediafire.com/file/qvrii06n54y0iew/sintel_24.mp4/file

They were generated using a commercial xHE-AAC encoder so unfortunately I cannot give the command that produced them, but using the same build of MP4Box we can see that the random access points are located at exactly the same composition timesamps in both files:

```
$ /Applications/GPAC.app/Contents/MacOS/MP4Box -std -dts sintel_12.mp4 2>/dev/null | awk '$8 == "1" { print $0 }'
Sample 1	DTS 0	CTS 0	339	1	2529	0	0	0	0	0	0	0
Sample 54	DTS 217088	CTS 217088	451	1	10114	0	0	0	0	0	0	0
Sample 108	DTS 438272	CTS 438272	568	1	18061	0	0	0	0	0	0	0
Sample 162	DTS 659456	CTS 659456	518	1	25882	0	0	0	0	0	0	0
Sample 216	DTS 880640	CTS 880640	546	1	33966	0	0	0	0	0	0	0
Sample 270	DTS 1101824	CTS 1101824	559	1	42042	0	0	0	0	0	0	0
Sample 323	DTS 1318912	CTS 1318912	557	1	49770	0	0	0	0	0	0	0

$ /Applications/GPAC.app/Contents/MacOS/MP4Box -std -dts sintel_24.mp4 2>/dev/null | awk '$8 == "1" { print $0 }'
Sample 1	DTS 0	CTS 0	350	1	3821	0	0	0	0	0	0	0
Sample 107	DTS 217088	CTS 217088	516	1	18814	0	0	0	0	0	0	0
Sample 215	DTS 438272	CTS 438272	504	1	34244	0	0	0	0	0	0	0
Sample 323	DTS 659456	CTS 659456	494	1	49724	0	0	0	0	0	0	0
Sample 431	DTS 880640	CTS 880640	504	1	65142	0	0	0	0	0	0	0
Sample 539	DTS 1101824	CTS 1101824	516	1	80491	0	0	0	0	0	0	0
Sample 645	DTS 1318912	CTS 1318912	518	1	95637	0	0	0	0	0	0	0
```

Notice that the "Sample" number is different in each representation because the xHE-AAC encoder uses different frame sizes for different bitrates. Nevertheless, the CTS for each RAP is the same in both files.

Operating system: MacOS 12.5

MP4Box installed from the nightly builds:
```
$ /Applications/GPAC.app/Contents/MacOS/MP4Box -version
MP4Box - GPAC version 2.1-DEV-rev259-gfc4749f9-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io

Please cite our work in your research:
	GPAC Filters: https://doi.org/10.1145/3339825.3394929
	GPAC: https://doi.org/10.1145/1291233.1291452

GPAC Configuration: --extra-cflags=-Wno-deprecated -Wno-shift-negative-value
Features: GPAC_CONFIG_DARWIN GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SSL GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FAAD GPAC_HAS_MAD GPAC_HAS_LIBA52 GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_FFMPEG GPAC_HAS_OPENSVC GPAC_HAS_JP2 GPAC_HAS_OPENHEVC GPAC_HAS_THEORA GPAC_HAS_VORBIS GPAC_HAS_XVID
``` 

Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!

- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95

Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/

--- end body ---
