FFmpeg Corruption Issue in ffmpeg version n4.2.2

Hi,
I’m experiencing an issue with FFmpeg in ffmpeg version n5.1.2, where the video stream appears to be corrupted. This issue did not occur in ffmpeg version n4.2.2, where the video clip runs smoothly. While the debug logs remain identical across versions, we observed that FFmpeg logs differ corruption errors appear continuously.

Following is the FFMPEG command -
/opt/scorer/bin/ffmpeg -max_reload 10 -hide_banner -loglevel info -nostats -nostdin -headers Authorization: Bearer TOKEN
https://openapi.safie.link/v2/devices/ba1qfsO5jNZqGr99qb7U/live/playlist.m3u8 -vsync vfr -copyts -start_at_zero -an -sn -c:v copy -f mpegts udp://172.133.0.1:22011/?pkt_size=1024&buffer_size=65535

Output of ffmpeg version n5.1.2

ffmpeg -max_reload 10 -hide_banner -loglevel info -nostats -nostdin -headers Authorization: Bearer TOKEN -i https://openapi.safie.link/v2/devices/ba1qfsO5jNZqGr99qb7U/live/playlist.m3u8 -vsync vfr -copyts -start_at_zero -an -sn -c:v copy -f mpegts udp://172.132.0.1:22011/?pkt_size=1024&buffer_size=65535

Output of ffmpeg version - n4.2.2

https @ 0x55720cfd4700] No trailing CRLF found in HTTP header. Adding it.
[hls @ 0x55720cfd3c00] skipping 1 segments ahead, expired from playlists

In the new version, corrupted packets appear, whereas in the old version, the video runs smoothly.

Next, I run a GStreamer pipeline where the source receives data from a UDP address and port. After decoding, I use an identity element to analyze the frames. If I extract frames at this stage, they appear to be stuck intermittently. However, after encoding and saving the output as an MP4 file using splitmuxsink, the video plays smoothly without any issues.

udpsrc -> watchdog -> queue -> identity -> tsparse -> tsdemux  
                              |  
                              +-> queue -> h264parse -> tee (emitter)  
                                      |  
                                      +-> queue -> out_video  
                                      |        |-> queue -> mp4mux.video (splitmuxsink)  
                                      |  
                                      +-> queue -> h264parse -> vah264dec -> videoconvert -> video/x-raw,format=RGBA  
                                            -> videorate -> video/x-raw(ANY),framerate=10/1 -> videoflip  
                                            -> identity (ZMQ_EMITTING_POINT) -> queue -> fakesink  

Are there any additional flags or modifications I can apply to the FFmpeg command or GStreamer pipeline to resolve this issue?

I have also tried setting the “decodebin” property, but it did not resolve the problem. Any insights or suggestions on alternative solutions would be greatly appreciated