* 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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user