* rocDecode: Added several fixes to samples. (#668)

- Fixed the build error with videodecodepicfiles sample.
 - Added error handling of sample app command option combination of memory type OUT_SURFACE_MEM_NOT_MAPPED and MD5 generation.

[ROCm/rocdecode commit: c388518965]
This commit is contained in:
Jeff Jiang
2025-11-04 21:12:56 -05:00
committed by GitHub
parent 9f857d54f0
commit 8b86f61514
7 changed files with 28 additions and 5 deletions
+5
View File
@@ -87,6 +87,11 @@ public:
} else
hst_ptr = static_cast<uint8_t *> (surf_mem);
if (hst_ptr == nullptr) {
ROCDEC_ERR("Null surface pointer.");
return;
}
// Need to covert interleaved planar to stacked planar, assuming 4:2:0 chroma sampling.
uint8_t *stacked_ptr = new uint8_t [output_image_size];
uint8_t *tmp_hst_ptr = hst_ptr;
@@ -956,7 +956,11 @@ void RocVideoDecoder::SaveFrameToFile(std::string output_file_name, void *surf_m
} else
hst_ptr = static_cast<uint8_t *> (surf_mem);
if (hst_ptr == nullptr) {
ROCDEC_ERR("Null surface pointer.");
return;
}
if (current_output_filename.empty()) {
current_output_filename = output_file_name;
}