From 791f0e91b71ec2725268fbb95faabed43c6a60b1 Mon Sep 17 00:00:00 2001 From: vaclav Date: Thu, 8 Jun 2023 13:04:51 +0200 Subject: [PATCH] fix issue 528: ISM Metadata file too short; under FIX_528_ISM_MD_FILE_TOO_SHORT --- lib_com/options.h | 3 +++ lib_util/ism_file_reader.c | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 4328602f5a..ad0ec5aef3 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -175,6 +175,9 @@ #define MASA_PREREND /* Nokia: Contribution 42: Support for IVAS_rend to merge MASA + other format to MASA */ +#define FIX_528_ISM_MD_FILE_TOO_SHORT /* VA: issue 528: ISM Metadata file too short */ + + /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_util/ism_file_reader.c b/lib_util/ism_file_reader.c index 7054d2081b..a898651362 100644 --- a/lib_util/ism_file_reader.c +++ b/lib_util/ism_file_reader.c @@ -113,6 +113,13 @@ ivas_error IsmFileReader_readNextFrame( file = self->file; +#ifdef FIX_528_ISM_MD_FILE_TOO_SHORT + while ( feof( self->file ) ) + { + rewind( self->file ); + } +#endif + if ( fgets( char_buff, META_LINE_LENGTH, file ) == NULL ) { return IVAS_ERR_FAILED_FILE_READ; -- GitLab