@@ -67,7 +67,6 @@ struct DecoderConfig {
6767 queueId = 0 ;
6868 gpuIndex = -1 ;
6969 forceParserType = VK_VIDEO_CODEC_OPERATION_NONE_KHR;
70- crcValues = nullptr ;
7170 decoderQueueSize = 5 ;
7271 enablePostProcessFilter = -1 ,
7372 enableStreamDemuxing = false ;
@@ -76,11 +75,10 @@ struct DecoderConfig {
7675 enableHwLoadBalancing = false ;
7776 selectVideoWithComputeQueue = false ;
7877 enableVideoEncoder = false ;
79- crcOutput = nullptr ;
8078 outputy4m = false ;
8179 outputcrcPerFrame = false ;
8280 outputcrc = false ;
83- crcOutputFile = nullptr ;
81+ crcOutputFileName. clear () ;
8482 }
8583
8684 using ProgramArgs = std::vector<ArgSpec>;
@@ -292,7 +290,7 @@ struct DecoderConfig {
292290 }},
293291 {" --crcoutfile" , nullptr , 1 , " Output file to store the CRC output into." ,
294292 [this ](const char **args, const ProgramArgs &a) {
295- crcOutputFile = fopen ( args[0 ], " wt " ) ;
293+ crcOutputFileName = args[0 ];
296294 return true ;
297295 }},
298296 {" --crcinit" , nullptr , 1 , " Initial value of the CRC separated by a comma, a set of CRCs can be specified with this commandline parameter" ,
@@ -387,10 +385,6 @@ struct DecoderConfig {
387385
388386 crcInitValue.push_back (0 );
389387 }
390-
391- if (crcOutputFile == nullptr ) {
392- crcOutputFile = stdout;
393- }
394388 }
395389 }
396390
@@ -434,7 +428,7 @@ struct DecoderConfig {
434428 return deviceUUID.empty () ? nullptr : deviceUUID.data ();
435429 }
436430
437- FILE* crcOutputFile ;
431+ std::string crcOutputFileName ;
438432 std::string appName;
439433 std::basic_string<uint8_t > deviceUUID;
440434 int initialWidth;
@@ -457,11 +451,9 @@ struct DecoderConfig {
457451 int queueId;
458452 VkVideoCodecOperationFlagBitsKHR forceParserType;
459453 std::vector<uint32_t > crcInitValue;
460- uint32_t *crcValues;
461454 uint32_t deviceId;
462455 uint32_t decoderQueueSize;
463456 int32_t enablePostProcessFilter;
464- uint32_t *crcOutput;
465457 uint32_t enableStreamDemuxing : 1 ;
466458 uint32_t directMode : 1 ;
467459 uint32_t vsync : 1 ;
0 commit comments