Add nullptr parameters check for all decoder/parser APIs and some code clean up (#120)

Этот коммит содержится в:
Aryan Salmanpour
2023-12-05 13:06:34 -05:00
коммит произвёл GitHub
родитель f008b52403
Коммит 9257cd6fcf
4 изменённых файлов: 70 добавлений и 53 удалений
+6 -6
Просмотреть файл
@@ -271,14 +271,14 @@ typedef struct _RocdecParserParams {
/************************************************************************************************/
//! \ingroup FUNCTS
//! \fn rocDecodeStatus ROCDECAPI rocDecCreateVideoParser(RocdecVideoParser *pHandle, RocdecParserParams *pParams)
//! \fn rocDecodeStatus ROCDECAPI rocDecCreateVideoParser(RocdecVideoParser *parser_handle, RocdecParserParams *params)
//! Create video parser object and initialize
/************************************************************************************************/
extern rocDecStatus ROCDECAPI rocDecCreateVideoParser(RocdecVideoParser *pHandle, RocdecParserParams *pParams);
extern rocDecStatus ROCDECAPI rocDecCreateVideoParser(RocdecVideoParser *parser_handle, RocdecParserParams *params);
/************************************************************************************************/
//! \ingroup FUNCTS
//! \fn rocDecodeStatus ROCDECAPI rocDecParseVideoData(RocdecVideoParser handle, RocdecSourceDataPacket *pPacket)
//! \fn rocDecodeStatus ROCDECAPI rocDecParseVideoData(RocdecVideoParser parser_handle, RocdecSourceDataPacket *packet)
//! Parse the video data from source data packet in pPacket
//! Extracts parameter sets like SPS, PPS, bitstream etc. from pPacket and
//! calls back pfnDecodePicture with RocdecPicParams data for kicking of HW decoding
@@ -286,14 +286,14 @@ extern rocDecStatus ROCDECAPI rocDecCreateVideoParser(RocdecVideoParser *pHandle
//! the decoder encounters a video format change
//! calls back pfnDisplayPicture with RocdecParserDispInfo data to display a video frame
/************************************************************************************************/
extern rocDecStatus ROCDECAPI rocDecParseVideoData(RocdecVideoParser handle, RocdecSourceDataPacket *pPacket);
extern rocDecStatus ROCDECAPI rocDecParseVideoData(RocdecVideoParser parser_handle, RocdecSourceDataPacket *packet);
/************************************************************************************************/
//! \ingroup FUNCTS
//! \fn rocDecStatus ROCDECAPI rocDecDestroyVideoParser(RocdecVideoParser handle)
//! \fn rocDecStatus ROCDECAPI rocDecDestroyVideoParser(RocdecVideoParser parser_handle)
//! Destroy the video parser object
/************************************************************************************************/
extern rocDecStatus ROCDECAPI rocDecDestroyVideoParser(RocdecVideoParser handle);
extern rocDecStatus ROCDECAPI rocDecDestroyVideoParser(RocdecVideoParser parser_handle);
#if defined(__cplusplus)
}