Remove some needless casts by using the right data type
This commit is contained in:
parent
8b8e0d4b3e
commit
3e13874a77
@ -58,7 +58,7 @@ using namespace std;
|
|||||||
//#define STICK_STREAM_SIZE // For Demo interfaces test with track file of integrated frames
|
//#define STICK_STREAM_SIZE // For Demo interfaces test with track file of integrated frames
|
||||||
|
|
||||||
void H264DecodeInstance (ISVCDecoder* pDecoder, const char* kpH264FileName, const char* kpOuputFileName,
|
void H264DecodeInstance (ISVCDecoder* pDecoder, const char* kpH264FileName, const char* kpOuputFileName,
|
||||||
int32_t& iWidth, int32_t& iHeight, void* pOptionFileName) {
|
int32_t& iWidth, int32_t& iHeight, const char* pOptionFileName) {
|
||||||
FILE* pH264File = NULL;
|
FILE* pH264File = NULL;
|
||||||
FILE* pYuvFile = NULL;
|
FILE* pYuvFile = NULL;
|
||||||
FILE* pOptionFile = NULL;
|
FILE* pOptionFile = NULL;
|
||||||
@ -115,11 +115,11 @@ void H264DecodeInstance (ISVCDecoder* pDecoder, const char* kpH264FileName, cons
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (pOptionFileName) {
|
if (pOptionFileName) {
|
||||||
pOptionFile = fopen ((char*)pOptionFileName, "wb");
|
pOptionFile = fopen (pOptionFileName, "wb");
|
||||||
if (pOptionFile == NULL) {
|
if (pOptionFile == NULL) {
|
||||||
fprintf (stderr, "Can not open optional file for write..\n");
|
fprintf (stderr, "Can not open optional file for write..\n");
|
||||||
} else
|
} else
|
||||||
fprintf (stderr, "Extra optional file: %s..\n", (char*)pOptionFileName);
|
fprintf (stderr, "Extra optional file: %s..\n", pOptionFileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf ("------------------------------------------------------\n");
|
printf ("------------------------------------------------------\n");
|
||||||
@ -446,7 +446,7 @@ int32_t main (int32_t iArgC, char* pArgV[]) {
|
|||||||
|
|
||||||
|
|
||||||
H264DecodeInstance (pDecoder, strInputFile.c_str(), strOutputFile.c_str(), iWidth, iHeight,
|
H264DecodeInstance (pDecoder, strInputFile.c_str(), strOutputFile.c_str(), iWidth, iHeight,
|
||||||
(!strOptionFile.empty() ? (void*) (const_cast<char*> (strOptionFile.c_str())) : NULL));
|
(!strOptionFile.empty() ? strOptionFile.c_str() : NULL));
|
||||||
|
|
||||||
if (sDecParam.pFileNameRestructed != NULL) {
|
if (sDecParam.pFileNameRestructed != NULL) {
|
||||||
delete []sDecParam.pFileNameRestructed;
|
delete []sDecParam.pFileNameRestructed;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user