播放器内部逻辑肯定是存在丢帧的逻辑的,只有丢掉不被依赖的帧才不会导致花屏,RFC中有说明。
H.264
具体可以参考rfc3984#section-1.3,也就是nal_ref_idc
的值为0时,此帧可以被丢弃。
NRI: 2 bits
nal_ref_idc. A value of 00 indicates that the content of the NAL
unit is not used to reconstruct reference pictures for inter
picture prediction. Such NAL units can be discarded without
risking the integrity of the reference pictures. Values greater
than 00 indicate that the decoding of the NAL unit is required to
maintain the integrity of the reference pictures.
HEVC
具体可以参考rfc7798#section-1.1.2,也就是nal_unit_type
类型为RASL_N
和RASL_R
时,此帧可以被丢弃。
There are two
types of leading pictures: Random Access Decodable Leading (RADL)
pictures and Random Access Skipped Leading (RASL) pictures. RADL
pictures are decodable when the decoding started at the associated
IRAP picture; RASL pictures are not decodable when the decoding
started at the associated IRAP picture and are usually discarded.
HEVC provides mechanisms to enable specifying the conformance of a
bitstream wherein the originally present RASL pictures have been
discarded. Consequently, system components can discard RASL
pictures, when needed, without worrying about causing the bitstream
to become non-compliant.