I'm using GStreamer to push mpeg TS segments over UDP to GPAC as:

```shell
gst-launch-1.0 -e \
    videotestsrc ! "video/x-raw,height=720,width=1280,framerate=25/1" ! queue ! tee name=video_raw_tee \
    audiotestsrc wave=ticks apply-tick-ramp=true tick-interval=100000000 freq=10000 volume=0.4 marker-tick-period=10 sine-periods-per-tick=20 ! queue ! tee name=audio_raw_tee \
    \
    video_raw_tee. ! queue name=video_scale_queue ! videoscale ! video/x-raw,height=240,width=360 ! tee name=video_scale_tee \
    \
    video_scale_tee. ! queue name=video_transcode_enc_queue ! videoconvert ! "video/x-raw,format=I420" ! \
        x264enc bitrate=2000 byte-stream=true key-int-max=25 bframes=0 aud=true tune=zerolatency pass=cbr ! \
        "video/x-h264,profile=baseline,stream-format=avc" ! h264parse config-interval=-1 ! tee name=video_transcoded_enc_tee \
    \
    audio_raw_tee. ! queue name=audio_enc_queue ! audioresample ! "audio/x-raw,rate=44100" ! tee name=audio_resample_tee \
    audio_resample_tee. ! queue ! audioconvert ! "audio/x-raw,channels=2" ! avenc_aac name=audio_encoder ! "audio/mpeg" ! aacparse ! tee name=audio_encoder_tee \
    \
    video_transcoded_enc_tee. ! queue name=video_transcoded_queue ! mpegtsmux m2ts-mode=false name=mpegts_mux_transcoded ! tee name=mpegts_mux_transcoded_tee \
    audio_encoder_tee. ! queue ! mpegts_mux_transcoded. \
    \
    mpegts_mux_transcoded_tee. ! queue ! udpsink host="${UDP_HOST}" port=${UDP_PORT} name=udp_sink_transcoded
```

In GPAC, I'm receiving the stream as:

```shell
gpac -i udp://0.0.0.0:5000/:gpac:listen=true:tsprobe=true \
    reframer:rt=on \
    -o /tmp/workdir/content/playlist.mpd:dmode=dynamic:utcs=https://time.akamai.com/?iso \
    -graph
```

and it works correctly. However, when I include a DRM stage as

```shell
gpac -i udp://0.0.0.0:5000/:gpac:listen=true:tsprobe=true \
    reframer:rt=on \
    cecrypt:cfile="/tmp/workdir/gpac-drm-dash.xml" \
    inspect \
    -graph \
    -logs=all@info
```

GPAC immediately segfaults. These are the logs:

```
gpac           | Refreshing list of modules in directory /usr/lib/gpac
gpac           | [Core] Added module gm_alsa.so.
gpac           | [Core] Added module gf_openhevc_dec.so.
gpac           | [Core] Added module gm_x11_out.so.
gpac           | [Core] Added module gm_ft_font.so.
gpac           | [Core] Added module gm_validator.so.
gpac           | [Core] Added module gm_pulseaudio.so.
gpac           | [Core] Added module gm_sdl_out.so.
gpac           | [Core] Added module gm_jack.so.
gpac           | Loaded 8 modules.
gpac           | [Core] Load module file gf_openhevc_dec.so
gpac           | [Core] Load module file gf_openhevc_dec.so OK
gpac           | [Sock_IPV6] Solving 0.0.0.0 address
gpac           | [Sock_IPV6] Host 0.0.0.0 found
gpac           | [SockIn] opening udp://0.0.0.0:5000/
[SockIn] Reception started after 39 ms9 seconds
gpac           | Filter sockin PID  connection pending, queuing packet
gpac           | Filter sockin PID  queuing downstream event PLAY
gpac           | Filter sockin (0x560f2056f110) PID  (0x560f2057c4e0) (1 fan-out) connected to filter m2tsdmx (0x560f205785d0)
gpac           | Filter sockin PID  event PLAY but PID is already playing, discarding
Unknown registration descriptor HDMVr 10 seconds
gpac           | Filter m2tsdmx PID P1V2 connection pending, queuing packet
gpac           | Filter m2tsdmx PID P1A3 connection pending, queuing packet
gpac           | Filter m2tsdmx PID P1A3 connection pending, queuing packet
Filter m2tsdmx (0x560f205785d0) PID P1V2 (0x560f205483f0) (1 fan-out) connected to filter rfnalu (0x560f20578f90)
gpac           | Filter m2tsdmx (0x560f205785d0) PID P1A3 (0x560f20561a90) (1 fan-out) connected to filter rfadts (0x560f20575be0)
gpac           | Filter rfnalu (0x560f20578f90) PID P1V2 (0x560f205a7f00) (1 fan-out) connected to filter reframer (0x560f20563fe0)
gpac           | Filter rfadts (0x560f20575be0) PID P1A3 (0x560f205a8530) (1 fan-out) connected to filter reframer (0x560f20563fe0)
gpac           | Filter reframer (0x560f20563fe0) PID P1V2 (0x560f205a8c80) (1 fan-out) connected to filter cecrypt (0x560f20562bc0)
gpac           | Filter reframer (0x560f20563fe0) PID P1A3 (0x560f205a9290) (1 fan-out) connected to filter cecrypt (0x560f20562bc0)
gpac           | Filter cecrypt PID P1V2 queuing downstream event PLAY
gpac           | Filter cecrypt (0x560f20562bc0) PID P1V2 (0x560f205a99c0) (1 fan-out) connected to filter inspect (0x560f20572210)
gpac           | Filter cecrypt PID P1A3 queuing downstream event PLAY
gpac           | Filter cecrypt (0x560f20562bc0) PID P1A3 (0x560f205b35a0) (1 fan-out) connected to filter inspect (0x560f20572210)
gpac           | Filter cecrypt PID P1V2 processed event PLAY - canceled no
gpac           | Filter cecrypt PID P1A3 processed event PLAY - canceled no
gpac           | Filter rfnalu PID P1V2 queuing downstream event PLAY
gpac           | Filter reframer PID P1V2 processed event PLAY - canceled yes
gpac           | Filter rfadts PID P1A3 queuing downstream event PLAY
gpac           | Filter reframer PID P1A3 processed event PLAY - canceled yes
gpac           | Filter reframer PID P1V2 event PLAY but PID is already playing, discarding
gpac           | Filter reframer PID P1A3 event PLAY but PID is already playing, discarding
gpac           | Filter rfnalu PID P1V2 processed event PLAY - canceled no
gpac           | Filter rfadts PID P1A3 processed event PLAY - canceled no
gpac           | Filter m2tsdmx PID P1V2 processed event PLAY - canceled no
gpac           | Filter m2tsdmx PID P1A3 processed event PLAY - canceled yes
gpac           | Filter sockin PID  event PLAY but PID is already playing, discarding
gpac           | Filter rfadts PID P1A3 property changed at this packet, triggering reconfigure
gpac           | Filter reframer PID P1A3 property changed at this packet, triggering reconfigure
gpac           | Filter cecrypt PID P1A3 property changed at this packet, triggering reconfigure
Filter rfnalu PID P1V2 property changed at this packet, triggering reconfigure
gpac           | Filter reframer PID P1V2 property changed at this packet, triggering reconfigure
gpac           | Segmentation fault (core dumped)
gpac exited with code 139
```

The DRM config file is correct as it works when using GPAC in RTMP listen mode.

## Method to reproduce the issue

```shell
git clone https://github.com/jadarve/gpac_experiments.git
cd gpac_experiments

# build the containers
docker build -t gpac_experiments:http_origin -f containers/http_origin.dockerfile .
docker build -t gpac_experiments:gstreamer -f containers/gstreamer.dockerfile .
docker build -t gpac_experiments:gpac -f containers/gpac.dockerfile .

# run the experiment
cd 3-udp_mpegts_drm
docker-compose up
```

I can provide the `gpac-drm-dash.xml` file privately.
Segfault when ingesting UDP/TS stream and applying DRM
This is a GitHub Issue
repo:gpac
owner:gpac
Title : Segfault when ingesting UDP/TS stream and applying DRM
Issue date:

--- start body ---
I'm using GStreamer to push mpeg TS segments over UDP to GPAC as:

```shell
gst-launch-1.0 -e \
    videotestsrc ! "video/x-raw,height=720,width=1280,framerate=25/1" ! queue ! tee name=video_raw_tee \
    audiotestsrc wave=ticks apply-tick-ramp=true tick-interval=100000000 freq=10000 volume=0.4 marker-tick-period=10 sine-periods-per-tick=20 ! queue ! tee name=audio_raw_tee \
    \
    video_raw_tee. ! queue name=video_scale_queue ! videoscale ! video/x-raw,height=240,width=360 ! tee name=video_scale_tee \
    \
    video_scale_tee. ! queue name=video_transcode_enc_queue ! videoconvert ! "video/x-raw,format=I420" ! \
        x264enc bitrate=2000 byte-stream=true key-int-max=25 bframes=0 aud=true tune=zerolatency pass=cbr ! \
        "video/x-h264,profile=baseline,stream-format=avc" ! h264parse config-interval=-1 ! tee name=video_transcoded_enc_tee \
    \
    audio_raw_tee. ! queue name=audio_enc_queue ! audioresample ! "audio/x-raw,rate=44100" ! tee name=audio_resample_tee \
    audio_resample_tee. ! queue ! audioconvert ! "audio/x-raw,channels=2" ! avenc_aac name=audio_encoder ! "audio/mpeg" ! aacparse ! tee name=audio_encoder_tee \
    \
    video_transcoded_enc_tee. ! queue name=video_transcoded_queue ! mpegtsmux m2ts-mode=false name=mpegts_mux_transcoded ! tee name=mpegts_mux_transcoded_tee \
    audio_encoder_tee. ! queue ! mpegts_mux_transcoded. \
    \
    mpegts_mux_transcoded_tee. ! queue ! udpsink host="${UDP_HOST}" port=${UDP_PORT} name=udp_sink_transcoded
```

In GPAC, I'm receiving the stream as:

```shell
gpac -i udp://0.0.0.0:5000/:gpac:listen=true:tsprobe=true \
    reframer:rt=on \
    -o /tmp/workdir/content/playlist.mpd:dmode=dynamic:utcs=https://time.akamai.com/?iso \
    -graph
```

and it works correctly. However, when I include a DRM stage as

```shell
gpac -i udp://0.0.0.0:5000/:gpac:listen=true:tsprobe=true \
    reframer:rt=on \
    cecrypt:cfile="/tmp/workdir/gpac-drm-dash.xml" \
    inspect \
    -graph \
    -logs=all@info
```

GPAC immediately segfaults. These are the logs:

```
gpac           | Refreshing list of modules in directory /usr/lib/gpac
gpac           | [Core] Added module gm_alsa.so.
gpac           | [Core] Added module gf_openhevc_dec.so.
gpac           | [Core] Added module gm_x11_out.so.
gpac           | [Core] Added module gm_ft_font.so.
gpac           | [Core] Added module gm_validator.so.
gpac           | [Core] Added module gm_pulseaudio.so.
gpac           | [Core] Added module gm_sdl_out.so.
gpac           | [Core] Added module gm_jack.so.
gpac           | Loaded 8 modules.
gpac           | [Core] Load module file gf_openhevc_dec.so
gpac           | [Core] Load module file gf_openhevc_dec.so OK
gpac           | [Sock_IPV6] Solving 0.0.0.0 address
gpac           | [Sock_IPV6] Host 0.0.0.0 found
gpac           | [SockIn] opening udp://0.0.0.0:5000/
[SockIn] Reception started after 39 ms9 seconds
gpac           | Filter sockin PID  connection pending, queuing packet
gpac           | Filter sockin PID  queuing downstream event PLAY
gpac           | Filter sockin (0x560f2056f110) PID  (0x560f2057c4e0) (1 fan-out) connected to filter m2tsdmx (0x560f205785d0)
gpac           | Filter sockin PID  event PLAY but PID is already playing, discarding
Unknown registration descriptor HDMVr 10 seconds
gpac           | Filter m2tsdmx PID P1V2 connection pending, queuing packet
gpac           | Filter m2tsdmx PID P1A3 connection pending, queuing packet
gpac           | Filter m2tsdmx PID P1A3 connection pending, queuing packet
Filter m2tsdmx (0x560f205785d0) PID P1V2 (0x560f205483f0) (1 fan-out) connected to filter rfnalu (0x560f20578f90)
gpac           | Filter m2tsdmx (0x560f205785d0) PID P1A3 (0x560f20561a90) (1 fan-out) connected to filter rfadts (0x560f20575be0)
gpac           | Filter rfnalu (0x560f20578f90) PID P1V2 (0x560f205a7f00) (1 fan-out) connected to filter reframer (0x560f20563fe0)
gpac           | Filter rfadts (0x560f20575be0) PID P1A3 (0x560f205a8530) (1 fan-out) connected to filter reframer (0x560f20563fe0)
gpac           | Filter reframer (0x560f20563fe0) PID P1V2 (0x560f205a8c80) (1 fan-out) connected to filter cecrypt (0x560f20562bc0)
gpac           | Filter reframer (0x560f20563fe0) PID P1A3 (0x560f205a9290) (1 fan-out) connected to filter cecrypt (0x560f20562bc0)
gpac           | Filter cecrypt PID P1V2 queuing downstream event PLAY
gpac           | Filter cecrypt (0x560f20562bc0) PID P1V2 (0x560f205a99c0) (1 fan-out) connected to filter inspect (0x560f20572210)
gpac           | Filter cecrypt PID P1A3 queuing downstream event PLAY
gpac           | Filter cecrypt (0x560f20562bc0) PID P1A3 (0x560f205b35a0) (1 fan-out) connected to filter inspect (0x560f20572210)
gpac           | Filter cecrypt PID P1V2 processed event PLAY - canceled no
gpac           | Filter cecrypt PID P1A3 processed event PLAY - canceled no
gpac           | Filter rfnalu PID P1V2 queuing downstream event PLAY
gpac           | Filter reframer PID P1V2 processed event PLAY - canceled yes
gpac           | Filter rfadts PID P1A3 queuing downstream event PLAY
gpac           | Filter reframer PID P1A3 processed event PLAY - canceled yes
gpac           | Filter reframer PID P1V2 event PLAY but PID is already playing, discarding
gpac           | Filter reframer PID P1A3 event PLAY but PID is already playing, discarding
gpac           | Filter rfnalu PID P1V2 processed event PLAY - canceled no
gpac           | Filter rfadts PID P1A3 processed event PLAY - canceled no
gpac           | Filter m2tsdmx PID P1V2 processed event PLAY - canceled no
gpac           | Filter m2tsdmx PID P1A3 processed event PLAY - canceled yes
gpac           | Filter sockin PID  event PLAY but PID is already playing, discarding
gpac           | Filter rfadts PID P1A3 property changed at this packet, triggering reconfigure
gpac           | Filter reframer PID P1A3 property changed at this packet, triggering reconfigure
gpac           | Filter cecrypt PID P1A3 property changed at this packet, triggering reconfigure
Filter rfnalu PID P1V2 property changed at this packet, triggering reconfigure
gpac           | Filter reframer PID P1V2 property changed at this packet, triggering reconfigure
gpac           | Segmentation fault (core dumped)
gpac exited with code 139
```

The DRM config file is correct as it works when using GPAC in RTMP listen mode.

## Method to reproduce the issue

```shell
git clone https://github.com/jadarve/gpac_experiments.git
cd gpac_experiments

# build the containers
docker build -t gpac_experiments:http_origin -f containers/http_origin.dockerfile .
docker build -t gpac_experiments:gstreamer -f containers/gstreamer.dockerfile .
docker build -t gpac_experiments:gpac -f containers/gpac.dockerfile .

# run the experiment
cd 3-udp_mpegts_drm
docker-compose up
```

I can provide the `gpac-drm-dash.xml` file privately.
--- end body ---
