Merge pull request #22250 from ocpalo:codec_fix

pull/22298/head
Alexander Smorkalov 2 years ago
commit 4c1e064a2b
  1. 4
      modules/imgcodecs/src/grfmt_jpeg.cpp
  2. 4
      modules/imgcodecs/src/grfmt_png.cpp

@ -260,9 +260,6 @@ bool JpegDecoder::readHeader()
} }
} }
if( !result )
close();
return result; return result;
} }
@ -512,7 +509,6 @@ bool JpegDecoder::readData( Mat& img )
} }
} }
close();
return result; return result;
} }

@ -214,9 +214,6 @@ bool PngDecoder::readHeader()
} }
} }
if( !result )
close();
return result; return result;
} }
@ -304,7 +301,6 @@ bool PngDecoder::readData( Mat& img )
} }
} }
close();
return result; return result;
} }

Loading…
Cancel
Save