Fix a bug for the video sequence callback function (#31)
[ROCm/rocdecode commit: 874bd59d89]
Este commit está contenido en:
@@ -243,7 +243,7 @@ void HEVCVideoParser::FillSeqCallbackFn(SpsData* sps_data) {
|
||||
video_format_params_.seqhdr_data_length = 0;
|
||||
|
||||
// callback function with RocdecVideoFormat params filled out
|
||||
pfn_sequece_cb_ = PFNVIDSEQUENCECALLBACK(&video_format_params_);
|
||||
pfn_sequece_cb_(parser_params_.pUserData, &video_format_params_);
|
||||
}
|
||||
|
||||
bool HEVCVideoParser::ParseFrameData(const uint8_t* p_stream, uint32_t frame_data_size) {
|
||||
|
||||
@@ -44,7 +44,7 @@ rocDecStatus RocVideoParser::Initialize(RocdecParserParams *pParams) {
|
||||
pfn_display_picture_cb_ = pParams->pfnDisplayPicture; /**< Called whenever a picture is ready to be displayed (display order) */
|
||||
pfn_get_sei_message_cb_ = pParams->pfnGetSEIMsg; /**< Called when all SEI messages are parsed for particular frame */
|
||||
|
||||
parser_params_ = pParams;
|
||||
parser_params_ = *pParams;
|
||||
|
||||
return ROCDEC_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -33,16 +33,16 @@ THE SOFTWARE.
|
||||
class RocVideoParser {
|
||||
public:
|
||||
RocVideoParser(); // default constructor
|
||||
RocVideoParser(RocdecParserParams *pParams) : parser_params_(pParams) {};
|
||||
RocVideoParser(RocdecParserParams *pParams) : parser_params_(*pParams) {};
|
||||
virtual ~RocVideoParser() = default ;
|
||||
virtual void SetParserParams(RocdecParserParams *pParams) { parser_params_ = pParams; };
|
||||
RocdecParserParams *GetParserParams() {return parser_params_;};
|
||||
virtual void SetParserParams(RocdecParserParams *pParams) { parser_params_ = *pParams; };
|
||||
RocdecParserParams *GetParserParams() {return &parser_params_;};
|
||||
virtual rocDecStatus Initialize(RocdecParserParams *pParams);
|
||||
virtual rocDecStatus ParseVideoData(RocdecSourceDataPacket *pData) = 0; // pure virtual: implemented by derived class
|
||||
virtual rocDecStatus UnInitialize() = 0; // pure virtual: implemented by derived class
|
||||
|
||||
protected:
|
||||
RocdecParserParams *parser_params_ = nullptr;
|
||||
RocdecParserParams parser_params_ = {};
|
||||
/**
|
||||
* @brief callback function pointers for the parser
|
||||
*
|
||||
|
||||
Referencia en una nueva incidencia
Block a user