Skip to content

Commit

Permalink
fix return self.ptr->getBackendName().c_str()
Browse files Browse the repository at this point in the history
  • Loading branch information
rainyl committed Oct 25, 2024
1 parent 9394c16 commit 936b8f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dartcv/videoio/videoio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,6 @@ int cv_VideoWriter_fourcc(char c1, char c2, char c3, char c4) {
return cv::VideoWriter::fourcc(c1, c2, c3, c4);
}

const char* cv_VideoWriter_getBackendName(VideoWriter self) {
return self.ptr->getBackendName().c_str();
char* cv_VideoWriter_getBackendName(VideoWriter self) {
return strdup(self.ptr->getBackendName().c_str());
}
2 changes: 1 addition & 1 deletion dartcv/videoio/videoio.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ bool cv_VideoWriter_isOpened(VideoWriter self);
CvStatus* cv_VideoWriter_write(VideoWriter self, Mat img, CvCallback_0 callback);
CvStatus* cv_VideoWriter_release(VideoWriter self);
int cv_VideoWriter_fourcc(char c1, char c2, char c3, char c4);
const char* cv_VideoWriter_getBackendName(VideoWriter self);
char* cv_VideoWriter_getBackendName(VideoWriter self);

#ifdef __cplusplus
}
Expand Down

0 comments on commit 936b8f3

Please sign in to comment.