I noticed a slight audio/video offset in the generated DASH assets, when adding the raw VVC-bitstreams directly instead of first creating mp4 files and adding those.

Here is what I did (tested with the latest master revision):
```
MP4Box -dash 2700 -rap -profile onDemand -segment-name '$File$_raw_$FS$$Number$' -out sintel_raw.mpd sintel-video.vvc:fps=24 sintel-audio.aac
```
This has a slight de-synchronization between audio and video in the generated assets.

On the other hand this works fine:
```
MP4Box -new sintel-video.mp4 -add sintel-video.vvc:fps=24
MP4Box -dash 2700 -rap -profile onDemand -segment-name '$File$_mp4_$FS$$Number$' -out sintel_mp4.mpd sintel-video.mp4 sintel-audio.aac
```

Looking at the dumped xml from the generated video mp4 shows, that in the case with the raw bitstream the `CTSOffset` values are calculated incorrectly:
```
<TrackRunBox Size="532" Type="trun" Version="1" Flags="2561" Specification="p12" Container="traf" SampleCount="64" DataOffset="665">
<TrackRunEntry Size="6006" CTSOffset="31"/>
<TrackRunEntry Size="2782" CTSOffset="14"/>
<TrackRunEntry Size="1562" CTSOffset="5"/>
<TrackRunEntry Size="649" CTSOffset="0"/>
<TrackRunEntry Size="327" CTSOffset="-3"/>
<TrackRunEntry Size="154" CTSOffset="-5"/>
<TrackRunEntry Size="151" CTSOffset="-4"/>
<TrackRunEntry Size="340" CTSOffset="-2"/>
<TrackRunEntry Size="150" CTSOffset="-4"/>
<TrackRunEntry Size="164" CTSOffset="-3"/>
...
```

In contrast, this is what it looks like, when adding the video as an MP4 file:
```
<TrackRunBox Size="532" Type="trun" Version="0" Flags="2561" Specification="p12" Container="traf" SampleCount="64" DataOffset="640">
<TrackRunEntry Size="6006" CTSOffset="36"/>
<TrackRunEntry Size="2782" CTSOffset="19"/>
<TrackRunEntry Size="1562" CTSOffset="10"/>
<TrackRunEntry Size="649" CTSOffset="5"/>
<TrackRunEntry Size="327" CTSOffset="2"/>
<TrackRunEntry Size="154" CTSOffset="0"/>
<TrackRunEntry Size="151" CTSOffset="1"/>
<TrackRunEntry Size="340" CTSOffset="3"/>
<TrackRunEntry Size="150" CTSOffset="1"/>
<TrackRunEntry Size="164" CTSOffset="2"/>
...
```
It looks like the decoding delay is not taken into account correctly.

I uploaded the corresponding bitstreams and DASH assets as VVC_Incorrect_CTSOffset.zip.
Incorrect CTSOffset when dashing raw (VVC-)bitstreams
This is a GitHub Issue
repo:gpac
owner:gpac
Title : Incorrect CTSOffset when dashing raw (VVC-)bitstreams
Issue date:

--- start body ---
I noticed a slight audio/video offset in the generated DASH assets, when adding the raw VVC-bitstreams directly instead of first creating mp4 files and adding those.

Here is what I did (tested with the latest master revision):
```
MP4Box -dash 2700 -rap -profile onDemand -segment-name '$File$_raw_$FS$$Number$' -out sintel_raw.mpd sintel-video.vvc:fps=24 sintel-audio.aac
```
This has a slight de-synchronization between audio and video in the generated assets.

On the other hand this works fine:
```
MP4Box -new sintel-video.mp4 -add sintel-video.vvc:fps=24
MP4Box -dash 2700 -rap -profile onDemand -segment-name '$File$_mp4_$FS$$Number$' -out sintel_mp4.mpd sintel-video.mp4 sintel-audio.aac
```

Looking at the dumped xml from the generated video mp4 shows, that in the case with the raw bitstream the `CTSOffset` values are calculated incorrectly:
```
<TrackRunBox Size="532" Type="trun" Version="1" Flags="2561" Specification="p12" Container="traf" SampleCount="64" DataOffset="665">
<TrackRunEntry Size="6006" CTSOffset="31"/>
<TrackRunEntry Size="2782" CTSOffset="14"/>
<TrackRunEntry Size="1562" CTSOffset="5"/>
<TrackRunEntry Size="649" CTSOffset="0"/>
<TrackRunEntry Size="327" CTSOffset="-3"/>
<TrackRunEntry Size="154" CTSOffset="-5"/>
<TrackRunEntry Size="151" CTSOffset="-4"/>
<TrackRunEntry Size="340" CTSOffset="-2"/>
<TrackRunEntry Size="150" CTSOffset="-4"/>
<TrackRunEntry Size="164" CTSOffset="-3"/>
...
```

In contrast, this is what it looks like, when adding the video as an MP4 file:
```
<TrackRunBox Size="532" Type="trun" Version="0" Flags="2561" Specification="p12" Container="traf" SampleCount="64" DataOffset="640">
<TrackRunEntry Size="6006" CTSOffset="36"/>
<TrackRunEntry Size="2782" CTSOffset="19"/>
<TrackRunEntry Size="1562" CTSOffset="10"/>
<TrackRunEntry Size="649" CTSOffset="5"/>
<TrackRunEntry Size="327" CTSOffset="2"/>
<TrackRunEntry Size="154" CTSOffset="0"/>
<TrackRunEntry Size="151" CTSOffset="1"/>
<TrackRunEntry Size="340" CTSOffset="3"/>
<TrackRunEntry Size="150" CTSOffset="1"/>
<TrackRunEntry Size="164" CTSOffset="2"/>
...
```
It looks like the decoding delay is not taken into account correctly.

I uploaded the corresponding bitstreams and DASH assets as VVC_Incorrect_CTSOffset.zip.
--- end body ---
