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

Hello! 

I'm trying to put DRM (fairplay) with `HLS SAES` but for some reason is not working as expected

1. When I put the `constant_IV` it puts it in each fragment when it should only put it in the "header" and besides it is not constant in each video fragment it increases in 1. **(look IV in the actual m3u8)**
2. The encryption type of the `EXT-X-KEY:METHOD` is left as `AES-128` and I am expecting it to be `SAMPLE-AES`.
### Command
```bash
gpac -i 1080.mp4 -o res-hls/manifest.m3u8:segdur=10:hlsdrm=drm-hls.xml
```
### drm-hls.xml
```xml
<?xml version="1.0" encoding="UTF-8"?>
<GPACDRM type="HLS SAES">
    <DRMInfo type="pssh" version="1" cypherOffset="1">
        <!-- System ID (Fairplay)  -->
        <BS ID128="94CE86FB07FF4F43ADB893D2FA968CA2"/>
        <BS value="1" bits="32"/>
        <BS ID128="0x4c2xxxxxxxxxxxxxxxxxxxxxdb156f8cda"/>
        <BS ID128="0xe98xxxxxxxxxxxxxxxxxxxxxe3261e7e1d"/>
    </DRMInfo>
    <CrypTrack constant_IV="0x4c2xxxxxxxxxxxxxxxxxxxxxdb156f8cda">
        <key KID="0x4c2xxxxxxxxxxxxxxxxxxxxxdb156f8cda" value="0xe98xxxxxxxxxxxxxxxxxxxxx3261e7e1d" hlsInfo='URI="skd://fps.drm_provider.com/;4c2xxxxx-xxxx-xxxx-xxxx-xxdb156f8cda"'/>
    </CrypTrack>
</GPACDRM>

```

### Actual
```m3u
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-VERSION:6
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-MAP:URI="1080_dash_track1_init.mp4"
#EXT-X-KEY:METHOD=AES-128,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCDB
#EXTINF:14.9333,
1080_dash_track1_1.m4s
#EXT-X-KEY:METHOD=AES-128,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCDC
#EXTINF:5.2,
1080_dash_track1_2.m4s
#EXT-X-KEY:METHOD=AES-128,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCDD
#EXTINF:10.2667,
1080_dash_track1_3.m4s
#EXT-X-KEY:METHOD=AES-128,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCDE
#EXTINF:10.1333,
1080_dash_track1_4.m4s
#EXT-X-KEY:METHOD=AES-128,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCDF
#EXTINF:10.1333,
1080_dash_track1_5.m4s
#EXT-X-KEY:METHOD=AES-128,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCD0
#EXTINF:9.8,
1080_dash_track1_6.m4s
#EXT-X-KEY:METHOD=AES-128,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCD1
#EXTINF:10.2,
1080_dash_track1_7.m4s
#EXT-X-KEY:METHOD=AES-128,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCD2
```
### Expected
```m3u8
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-VERSION:6
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-MAP:URI="1080_dash_track1_init.mp4"
#EXT-X-KEY:METHOD=SAMPLE-AES,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCDA
#EXTINF:14.9333,
1080_dash_track1_1.m4s
#EXTINF:5.2,
1080_dash_track1_2.m4s
#EXTINF:10.2667,
1080_dash_track1_3.m4s
#EXTINF:10.1333,
1080_dash_track1_4.m4s
#EXTINF:10.1333,
1080_dash_track1_5.m4s
#EXTINF:9.8,
1080_dash_track1_6.m4s
#EXTINF:10.2,
1080_dash_track1_7.m4s
```

I don't know if maybe I'm missing something, but from all the documentation I've read, the command and the DRM config looks good 


DRM with fairplay and HLS SAES problms
This is a GitHub Issue
repo:gpac
owner:gpac
Title : DRM with fairplay and HLS SAES problms
Issue date:

--- start body ---
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

Hello! 

I'm trying to put DRM (fairplay) with `HLS SAES` but for some reason is not working as expected

1. When I put the `constant_IV` it puts it in each fragment when it should only put it in the "header" and besides it is not constant in each video fragment it increases in 1. **(look IV in the actual m3u8)**
2. The encryption type of the `EXT-X-KEY:METHOD` is left as `AES-128` and I am expecting it to be `SAMPLE-AES`.
### Command
```bash
gpac -i 1080.mp4 -o res-hls/manifest.m3u8:segdur=10:hlsdrm=drm-hls.xml
```
### drm-hls.xml
```xml
<?xml version="1.0" encoding="UTF-8"?>
<GPACDRM type="HLS SAES">
    <DRMInfo type="pssh" version="1" cypherOffset="1">
        <!-- System ID (Fairplay)  -->
        <BS ID128="94CE86FB07FF4F43ADB893D2FA968CA2"/>
        <BS value="1" bits="32"/>
        <BS ID128="0x4c2xxxxxxxxxxxxxxxxxxxxxdb156f8cda"/>
        <BS ID128="0xe98xxxxxxxxxxxxxxxxxxxxxe3261e7e1d"/>
    </DRMInfo>
    <CrypTrack constant_IV="0x4c2xxxxxxxxxxxxxxxxxxxxxdb156f8cda">
        <key KID="0x4c2xxxxxxxxxxxxxxxxxxxxxdb156f8cda" value="0xe98xxxxxxxxxxxxxxxxxxxxx3261e7e1d" hlsInfo='URI="skd://fps.drm_provider.com/;4c2xxxxx-xxxx-xxxx-xxxx-xxdb156f8cda"'/>
    </CrypTrack>
</GPACDRM>

```

### Actual
```m3u
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-VERSION:6
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-MAP:URI="1080_dash_track1_init.mp4"
#EXT-X-KEY:METHOD=AES-128,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCDB
#EXTINF:14.9333,
1080_dash_track1_1.m4s
#EXT-X-KEY:METHOD=AES-128,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCDC
#EXTINF:5.2,
1080_dash_track1_2.m4s
#EXT-X-KEY:METHOD=AES-128,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCDD
#EXTINF:10.2667,
1080_dash_track1_3.m4s
#EXT-X-KEY:METHOD=AES-128,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCDE
#EXTINF:10.1333,
1080_dash_track1_4.m4s
#EXT-X-KEY:METHOD=AES-128,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCDF
#EXTINF:10.1333,
1080_dash_track1_5.m4s
#EXT-X-KEY:METHOD=AES-128,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCD0
#EXTINF:9.8,
1080_dash_track1_6.m4s
#EXT-X-KEY:METHOD=AES-128,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCD1
#EXTINF:10.2,
1080_dash_track1_7.m4s
#EXT-X-KEY:METHOD=AES-128,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCD2
```
### Expected
```m3u8
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-VERSION:6
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-MAP:URI="1080_dash_track1_init.mp4"
#EXT-X-KEY:METHOD=SAMPLE-AES,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCDA
#EXTINF:14.9333,
1080_dash_track1_1.m4s
#EXTINF:5.2,
1080_dash_track1_2.m4s
#EXTINF:10.2667,
1080_dash_track1_3.m4s
#EXTINF:10.1333,
1080_dash_track1_4.m4s
#EXTINF:10.1333,
1080_dash_track1_5.m4s
#EXTINF:9.8,
1080_dash_track1_6.m4s
#EXTINF:10.2,
1080_dash_track1_7.m4s
```

I don't know if maybe I'm missing something, but from all the documentation I've read, the command and the DRM config looks good 


--- end body ---
