Using ffmpeg examples transcoding.c. (https://github.com/FFmpeg/FFmpeg/blob/release/4.1/doc/examples/transcoding.c)
This is read by ffprobe.exe (ffprobe.exe -i test.mp4 -show_packets)
[PACKET]
codec_type=video
stream_index=0
pts=162000
pts_time=1.800000
dts=162000
dts_time=1.800000
duration=18000
duration_time=0.200000
size=238317
pos=2285176
flags=__
[/PACKET]
[PACKET]
codec_type=video
stream_index=0
pts=180000
pts_time=2.000000
dts=180000
dts_time=2.000000
duration=18000
duration_time=0.200000
size=24111
pos=2523493
flags=_D
The last packet flags has AV_PKT_FLAG_DISCARD.