diff --git a/.mailmap b/.mailmap
index 2886fdab7698af27f0ed90fbb6a3abbadcc2c68a..646d37da8900afc1a51623aca02a5ae49b2a3ba0 100644
--- a/.mailmap
+++ b/.mailmap
@@ -84,6 +84,7 @@ Rémi Cresson <remi.cresson@irstea.fr>                     Rémi <remi.cresson@t
 Rémi Cresson <remi.cresson@irstea.fr>                     remi <remi.cresson@irstea.fr>
 Rémi Cresson <remi.cresson@irstea.fr>                     remi cresson <remi.cresson@teledetection.fr>
 Rémi Cresson <remi.cresson@irstea.fr>                     remicres <remi.cresson@teledetection.fr>
+Rémi Cresson <remi.cresson@irstea.fr>                     remi cresson <remi.cresson@inrae.fr>
 Sebastien Harasse <sebastien.harasse@c-s.fr>
 Stephane Albert <stephane.albert@c-s.fr>
 Stephane Albert <stephane.albert@c-s.fr>                  Stephane ALBERT <stephane.albert@c-s.fr>
diff --git a/Modules/Filtering/Mosaic/include/otbStreamingMosaicFilterBase.hxx b/Modules/Filtering/Mosaic/include/otbStreamingMosaicFilterBase.hxx
index 2f53952bab5a6deed52d2d2a8c0d13a023b430f7..06d141e7c3f246dac31ab4547c5db0a78780cb82 100644
--- a/Modules/Filtering/Mosaic/include/otbStreamingMosaicFilterBase.hxx
+++ b/Modules/Filtering/Mosaic/include/otbStreamingMosaicFilterBase.hxx
@@ -321,18 +321,21 @@ void StreamingMosaicFilterBase<TInputImage, TOutputImage, TInternalValueType>::G
   itk::EncapsulateMetaData<std::string>(mosaicMetaData, static_cast<std::string>(otb::MetaDataKey::ProjectionRefKey), projectionRef);
 
   // check no data pixels
-  if (m_NoDataOutputPixel.GetSize() != nbOfBands || m_NoDataInputPixel.GetSize() != nbOfBands)
+  if (m_NoDataInputPixel.GetSize() != nbOfBands)
   {
-    if (m_NoDataOutputPixel.GetSize() != 0)
-      itkWarningMacro(<< "Specified NoDataOutputPixel has not " << nbOfBands << " components. Using default (zeros)");
     if (m_NoDataInputPixel.GetSize() != 0)
       itkWarningMacro(<< "Specified NoDataInputPixel has not " << nbOfBands << " components. Using default (zeros)");
 
-    m_NoDataOutputPixel.SetSize(nbOfBands);
     m_NoDataInputPixel.SetSize(nbOfBands);
-    m_NoDataOutputPixel.Fill(itk::NumericTraits<OutputImageInternalPixelType>::Zero);
     m_NoDataInputPixel.Fill(itk::NumericTraits<InputImageInternalPixelType>::Zero);
   }
+  if (m_NoDataOutputPixel.GetSize() == 0)
+  {
+    itkWarningMacro(<< "NoDataOutputPixel not set. Using zeros");
+    m_NoDataOutputPixel.SetSize(nbOfBands);
+    m_NoDataOutputPixel.Fill(itk::NumericTraits<InputImageInternalPixelType>::Zero);
+  }
+
 
   // Write no data flags
   std::vector<bool>   noDataValueAvailable;
@@ -444,4 +447,4 @@ void StreamingMosaicFilterBase<TInputImage, TOutputImage, TInternalValueType>::P
 
 } // end namespace otb
 
-#endif
+#endif
\ No newline at end of file