H264 frame drop with the drop of one slice / visible artefacts that do not happen with the reference decoder

Description

I am trying to transcode from .264 to yuv format.

I dropped slices (one by one) in h264 file format and then decoded the .264 to yuv format. During decoding, decoder is dropping the respective frame if I drop the header slice/first slice of the frame. Happening for P and B both.

I can decode the first 39 frames of the sample with the reference decoder and while FFmpeg decodes the same 39 frames, only the first three and the last 20 (beginning with the second IDR frame) are bit-exact, the remaining 16 show visible artefacts with FFmpeg (that are not reproducible with the reference decoder).

For the above warning I increased the MAX_SLICE value but still getting the same warning and from the decoder on different machine with increased MAX_SLICE value where I am not getting the above warning also getting same frame drop.

I can decode the first 39 frames of the sample with the reference decoder and while FFmpeg decodes the same 39 frames, only the first three and the last 20 (beginning with the second IDR frame) are bit-exact, the remaining 16 show visible artefacts with FFmpeg (that are not reproducible with the reference decoder).