small cleanup

Signed-off-by: Rosen Penev <rosenp@gmail.com>
main
Rosen Penev 2 years ago
parent 100eabbc08
commit 9894c69cd0

@ -276,16 +276,14 @@ void AsfVideo::decodeBlock() {
extendedStreamProperties(); extendedStreamProperties();
else if (tag->second == "Degradable_JPEG_Media") else if (tag->second == "Degradable_JPEG_Media")
DegradableJPEGMedia(); DegradableJPEGMedia();
else // tag found but not processed else { // tag found but not processed
{
// Make sure that the remaining size is non-zero, so that we won't // Make sure that the remaining size is non-zero, so that we won't
// keep revisiting the same location in the file. // keep revisiting the same location in the file.
const uint64_t remaining_size = objectHeader.getRemainingSize(); const uint64_t remaining_size = objectHeader.getRemainingSize();
Internal::enforce(remaining_size > 0, Exiv2::ErrorCode::kerCorruptedMetadata); Internal::enforce(remaining_size > 0, Exiv2::ErrorCode::kerCorruptedMetadata);
io_->seekOrThrow(io_->tell() + remaining_size, BasicIo::beg, ErrorCode::kerFailedToReadImageData); io_->seekOrThrow(io_->tell() + remaining_size, BasicIo::beg, ErrorCode::kerFailedToReadImageData);
} }
} else // tag not found } else { // tag not found
{
// Make sure that the remaining size is non-zero, so that we won't keep // Make sure that the remaining size is non-zero, so that we won't keep
// revisiting the same location in the file. // revisiting the same location in the file.
const uint64_t remaining_size = objectHeader.getRemainingSize(); const uint64_t remaining_size = objectHeader.getRemainingSize();

@ -66,7 +66,13 @@ enum {
// ***************************************************************************** // *****************************************************************************
// class member definitions // class member definitions
#ifdef EXV_ENABLE_BMFF #ifndef EXV_ENABLE_BMFF
namespace Exiv2 {
bool enableBMFF(bool) {
return false;
}
} // namespace Exiv2
#else
namespace Exiv2 { namespace Exiv2 {
static bool enabled = false; static bool enabled = false;
bool enableBMFF(bool enable) { bool enableBMFF(bool enable) {
@ -801,10 +807,4 @@ bool isBmffType(BasicIo& iIo, bool advance) {
return matched; return matched;
} }
} // namespace Exiv2 } // namespace Exiv2
#else // ifdef EXV_ENABLE_BMFF
namespace Exiv2 {
bool enableBMFF(bool) {
return false;
}
} // namespace Exiv2
#endif #endif

Loading…
Cancel
Save