A similar issue to #1913 has been reintroduced in commit 796bb9e5e. When packaging a VVC bitstream, that contains IDRs with leading pictures, the CompositionOffset and thus the resulting CTS is calculated wrongly. CRAs with leading pictures seem to be fine.

I uploaded a raw bitstream (foreman.266) and resulting mp4 file (foreman.mp4) to the Mediafire share.

This is the command line for creating the MP4 file: `~/src/gpac/_build/bin/gcc/MP4Box -new foreman.mp4 -add foreman.266:fps=30`
and an excerpt from the `-diso` dump:
```
<CompositionOffsetBox Size="2416" Type="ctts" Version="0" Flags="0" Specification="p12" Container="stbl" EntryCount="300">
<CompositionOffsetEntry CompositionOffset="5" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="36" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="19" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="10" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="5" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="0" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="1" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="1" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="6" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="1" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="4" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="11" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="6" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="1" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="4" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="7" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="4" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="5" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="4" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="5" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="52" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="43" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="38" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="35" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="33" SampleCount="1"/>
...
```

but the correct entries should be:
```
<CompositionOffsetBox Size="2416" Type="ctts" Version="0" Flags="0" Specification="p12" Container="stbl" EntryCount="300">
<CompositionOffsetEntry CompositionOffset="5" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="36" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="19" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="10" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="5" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="0" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="1" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="1" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="6" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="1" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="4" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="11" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="6" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="1" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="4" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="7" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="4" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="5" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="4" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="36" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="19" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="10" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="5" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="0" SampleCount="1"/>
...
```
Regression: Wrong CompositionOffset for VVC IDR with leading pictures
This is a GitHub Issue
repo:gpac
owner:gpac
Title : Regression: Wrong CompositionOffset for VVC IDR with leading pictures
Issue date:

--- start body ---
A similar issue to #1913 has been reintroduced in commit 796bb9e5e. When packaging a VVC bitstream, that contains IDRs with leading pictures, the CompositionOffset and thus the resulting CTS is calculated wrongly. CRAs with leading pictures seem to be fine.

I uploaded a raw bitstream (foreman.266) and resulting mp4 file (foreman.mp4) to the Mediafire share.

This is the command line for creating the MP4 file: `~/src/gpac/_build/bin/gcc/MP4Box -new foreman.mp4 -add foreman.266:fps=30`
and an excerpt from the `-diso` dump:
```
<CompositionOffsetBox Size="2416" Type="ctts" Version="0" Flags="0" Specification="p12" Container="stbl" EntryCount="300">
<CompositionOffsetEntry CompositionOffset="5" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="36" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="19" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="10" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="5" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="0" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="1" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="1" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="6" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="1" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="4" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="11" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="6" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="1" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="4" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="7" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="4" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="5" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="4" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="5" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="52" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="43" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="38" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="35" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="33" SampleCount="1"/>
...
```

but the correct entries should be:
```
<CompositionOffsetBox Size="2416" Type="ctts" Version="0" Flags="0" Specification="p12" Container="stbl" EntryCount="300">
<CompositionOffsetEntry CompositionOffset="5" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="36" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="19" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="10" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="5" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="0" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="1" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="1" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="6" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="1" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="4" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="11" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="6" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="1" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="4" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="7" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="4" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="5" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="4" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="36" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="19" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="10" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="5" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="0" SampleCount="1"/>
...
```
--- end body ---
