* rocDecode/HEVC: Added empty NAL detection. (#452)

[ROCm/rocdecode commit: b3f8fec41b]
Этот коммит содержится в:
jeffqjiangNew
2024-11-13 13:28:29 -05:00
коммит произвёл GitHub
родитель a10329af7a
Коммит d30754651f
2 изменённых файлов: 5 добавлений и 6 удалений
+1 -1
Просмотреть файл
@@ -566,7 +566,7 @@ ParserResult HevcVideoParser::ParsePictureData(const uint8_t* p_stream, uint32_t
return ret;
}
// Parse the NAL unit
if (nal_unit_size_) {
if (nal_unit_size_ >= 5) {
// start code + NAL unit header = 5 bytes
int ebsp_size = nal_unit_size_ - 5 > RBSP_BUF_SIZE ? RBSP_BUF_SIZE : nal_unit_size_ - 5; // only copy enough bytes for header parsing