An electronic device, the electronic device comprising: a processor; and a memory including computer program code, the memory and the computer program code configured to, working with the processor, cause the electronic device to perform at least the following: encode, in a bitstream, a Clean Random Access, CRA, picture, wherein the CRA picture is a picture that occurs at a random access point in the bitstream where decoding of the bitstream can be started, includes only intra-prediction slices, I-slices, that are decoded using intra-prediction only, and does not refer to any picture or pictures other than itself for prediction in a decoding order; determine whether the CRA picture has a subsequent leading picture, wherein the subsequent leading picture is a picture which follows the CRA picture in a decoding order and precedes the CRA picture in an output order; when the CRA picture has a subsequent leading picture, generate a first Network Access Layer, NAL, unit type of the CRA picture indicating that the CRA picture has a subsequent leading picture, encode, in the bitstream, the first NAL unit type for NAL units comprising the CRA picture, and encode, in the bitstream, the subsequent leading picture such that the subsequent leading picture follows the CRA picture in the decoding order; when the CRA picture does not have a subsequent leading picture, generate a second Network Access Layer, NAL, unit type of the CRA picture indicating that the CRA picture does not have a subsequent leading picture, the second NAL unit type being different from the first NAL unit type, and encode, in the bitstream, the second NAL unit type for the NAL units comprising the CRA picture. a processor; and a memory including computer program code, the memory and the computer program code configured to, working with the processor, cause the electronic device to perform at least the following: encode, in a bitstream, a Clean Random Access, CRA, picture, wherein the CRA picture is a picture that occurs at a random access point in the bitstream where decoding of the bitstream can be started, includes only intra-prediction slices, I-slices, that are decoded using intra-prediction only, and does not refer to any picture or pictures other than itself for prediction in a decoding order; determine whether the CRA picture has a subsequent leading picture, wherein the subsequent leading picture is a picture which follows the CRA picture in a decoding order and precedes the CRA picture in an output order; when the CRA picture has a subsequent leading picture, generate a first Network Access Layer, NAL, unit type of the CRA picture indicating that the CRA picture has a subsequent leading picture, encode, in the bitstream, the first NAL unit type for NAL units comprising the CRA picture, and encode, in the bitstream, the subsequent leading picture such that the subsequent leading picture follows the CRA picture in the decoding order; when the CRA picture does not have a subsequent leading picture, generate a second Network Access Layer, NAL, unit type of the CRA picture indicating that the CRA picture does not have a subsequent leading picture, the second NAL unit type being different from the first NAL unit type, and encode, in the bitstream, the second NAL unit type for the NAL units comprising the CRA picture. encode, in a bitstream, a Clean Random Access, CRA, picture, wherein the CRA picture is a picture that occurs at a random access point in the bitstream where decoding of the bitstream can be started, includes only intra-prediction slices, I-slices, that are decoded using intra-prediction only, and does not refer to any picture or pictures other than itself for prediction in a decoding order; determine whether the CRA picture has a subsequent leading picture, wherein the subsequent leading picture is a picture which follows the CRA picture in a decoding order and precedes the CRA picture in an output order; when the CRA picture has a subsequent leading picture, generate a first Network Access Layer, NAL, unit type of the CRA picture indicating that the CRA picture has a subsequent leading picture, encode, in the bitstream, the first NAL unit type for NAL units comprising the CRA picture, and encode, in the bitstream, the subsequent leading picture such that the subsequent leading picture follows the CRA picture in the decoding order; generate a first Network Access Layer, NAL, unit type of the CRA picture indicating that the CRA picture has a subsequent leading picture, encode, in the bitstream, the first NAL unit type for NAL units comprising the CRA picture, and encode, in the bitstream, the subsequent leading picture such that the subsequent leading picture follows the CRA picture in the decoding order; when the CRA picture does not have a subsequent leading picture, generate a second Network Access Layer, NAL, unit type of the CRA picture indicating that the CRA picture does not have a subsequent leading picture, the second NAL unit type being different from the first NAL unit type, and encode, in the bitstream, the second NAL unit type for the NAL units comprising the CRA picture. generate a second Network Access Layer, NAL, unit type of the CRA picture indicating that the CRA picture does not have a subsequent leading picture, the second NAL unit type being different from the first NAL unit type, and encode, in the bitstream, the second NAL unit type for the NAL units comprising the CRA picture.