From bf9253bde9eb899cb9fd0485e484308829dca26d Mon Sep 17 00:00:00 2001 From: Shekhar Chauhan Date: Mon, 13 Mar 2023 09:17:38 +0530 Subject: [PATCH] Handling failure condition in writing to yuv file Adding 'else' condition if sfc_stream is unable to open the file for writing. Signed-off-by: Shekhar Chauhan --- vendor/intel/sfcsample/VDecAccelVA.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vendor/intel/sfcsample/VDecAccelVA.cpp b/vendor/intel/sfcsample/VDecAccelVA.cpp index 17d5f8ff..d69f7d55 100755 --- a/vendor/intel/sfcsample/VDecAccelVA.cpp +++ b/vendor/intel/sfcsample/VDecAccelVA.cpp @@ -586,6 +586,9 @@ bool mvaccel::VDecAccelVAImpl::DecodePicture() fwrite(gfx_surface_buf, file_size, 1, sfc_stream); fclose(sfc_stream); } + else { + printf("Fail to open sfc_sample_176_144_argb.yuv for writing\n"); + } //unlock surface and clear unlock_surface(m_sfcIDs[0]);