diff --git a/source/Lib/CommonLib/Slice.cpp b/source/Lib/CommonLib/Slice.cpp
index 5e1a924773a4c5801ce86c9c1567bb566f761346..1d00ef41df6b2ce065a13e6d0cf777ad446fe38d 100644
--- a/source/Lib/CommonLib/Slice.cpp
+++ b/source/Lib/CommonLib/Slice.cpp
@@ -1123,7 +1123,7 @@ void Slice::checkLeadingPictureRestrictions(PicList& rcListPic, const PPS& pps)
 
   // No RASL pictures shall be present in the bitstream that are associated with
   // an IDR picture.
-  if (nalUnitType == NAL_UNIT_CODED_SLICE_RASL)
+  if (nalUnitType == NAL_UNIT_CODED_SLICE_RASL && !pps.getMixedNaluTypesInPicFlag())
   {
     CHECK( this->getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_IDR_N_LP   ||
            this->getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL, "Invalid NAL unit type");
@@ -1132,7 +1132,7 @@ void Slice::checkLeadingPictureRestrictions(PicList& rcListPic, const PPS& pps)
   // No RADL pictures shall be present in the bitstream that are associated with
   // a BLA picture having nal_unit_type equal to BLA_N_LP or that are associated
   // with an IDR picture having nal_unit_type equal to IDR_N_LP.
-  if (nalUnitType == NAL_UNIT_CODED_SLICE_RADL)
+  if (nalUnitType == NAL_UNIT_CODED_SLICE_RADL && !pps.getMixedNaluTypesInPicFlag())
   {
     CHECK (this->getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_IDR_N_LP, "Invalid NAL unit type");
   }
@@ -1155,7 +1155,7 @@ void Slice::checkLeadingPictureRestrictions(PicList& rcListPic, const PPS& pps)
 
     if (pcSlice->getPicHeader()->getPicOutputFlag() == 1 && !this->getPicHeader()->getNoOutputOfPriorPicsFlag() && pcPic->layerId == this->m_nuhLayerId)
     {
-      if (nalUnitType == NAL_UNIT_CODED_SLICE_CRA || nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP || nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL)
+      if ((nalUnitType == NAL_UNIT_CODED_SLICE_CRA || nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP || nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL) && !pps.getMixedNaluTypesInPicFlag())
       {
         CHECK(pcPic->poc >= this->getPOC(), "Any picture, with nuh_layer_id equal to a particular value layerId, that precedes an IRAP picture with nuh_layer_id "
               "equal to layerId in decoding order shall precede the IRAP picture in output order.");
@@ -1166,7 +1166,7 @@ void Slice::checkLeadingPictureRestrictions(PicList& rcListPic, const PPS& pps)
     {
       if (nalUnitType == NAL_UNIT_CODED_SLICE_RADL)
       {
-        if (this->getAssociatedIRAPPOC() > pcSlice->getAssociatedIRAPPOC())
+        if (this->getAssociatedIRAPPOC() > pcSlice->getAssociatedIRAPPOC() && !pps.getMixedNaluTypesInPicFlag())
         {
           if (this->getAssociatedIRAPPOC() != pcPic->poc)
           {
@@ -1188,7 +1188,7 @@ void Slice::checkLeadingPictureRestrictions(PicList& rcListPic, const PPS& pps)
     }
 
     if ((nalUnitType == NAL_UNIT_CODED_SLICE_RASL || nalUnitType == NAL_UNIT_CODED_SLICE_RADL) && 
-      (pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RASL && pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RADL))
+      (pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RASL && pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RADL) && !pps.getMixedNaluTypesInPicFlag())
     {
       if (pcSlice->getAssociatedIRAPPOC() == this->getAssociatedIRAPPOC() && pcPic->layerId == this->m_nuhLayerId)
       {
@@ -1206,7 +1206,7 @@ void Slice::checkLeadingPictureRestrictions(PicList& rcListPic, const PPS& pps)
       }
     }
 
-    if (nalUnitType == NAL_UNIT_CODED_SLICE_RASL)
+    if (nalUnitType == NAL_UNIT_CODED_SLICE_RASL && !pps.getMixedNaluTypesInPicFlag())
     {
       if ((this->getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_CRA) &&
           this->getAssociatedIRAPPOC() == pcSlice->getAssociatedIRAPPOC())
@@ -1218,7 +1218,7 @@ void Slice::checkLeadingPictureRestrictions(PicList& rcListPic, const PPS& pps)
       }
     }
 
-    if (nalUnitType == NAL_UNIT_CODED_SLICE_RASL)
+    if (nalUnitType == NAL_UNIT_CODED_SLICE_RASL && !pps.getMixedNaluTypesInPicFlag())
     {
       if(this->getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_CRA)
       {
diff --git a/source/Lib/DecoderLib/DecLib.cpp b/source/Lib/DecoderLib/DecLib.cpp
index 0ee14c9ff1154790e5ca5009b8f8174e4fe1603c..a94f901e0a2c76de844c3ce02af696bc9fc55ecc 100644
--- a/source/Lib/DecoderLib/DecLib.cpp
+++ b/source/Lib/DecoderLib/DecLib.cpp
@@ -1851,7 +1851,7 @@ bool DecLib::xDecodeSlice(InputNALUnit &nalu, int &iSkipFrame, int iPOCLastDispl
   }
   else
   {
-    CHECK(nalu.m_nalUnitType != m_pcPic->slices[m_uiSliceSegmentIdx - 1]->getNalUnitType(), "The value of NAL unit type shall be the same for all coded slice NAL units of a picture");
+    CHECK(nalu.m_nalUnitType != m_pcPic->slices[m_uiSliceSegmentIdx - 1]->getNalUnitType() && !m_pcPic->cs->pps->getMixedNaluTypesInPicFlag(), "If pps_mixed_nalu_types_in_pic_flag is equal to 0, the value of NAL unit type shall be the same for all coded slice NAL units of a picture");
     m_apcSlicePilot->copySliceInfo( m_pcPic->slices[m_uiSliceSegmentIdx-1] );
   }
 
@@ -2570,7 +2570,7 @@ void DecLib::updatePrevGDRInSameLayer()
 {
   const NalUnitType pictureType = m_pcPic->getPictureType();
 
-  if (pictureType == NAL_UNIT_CODED_SLICE_GDR)
+  if (pictureType == NAL_UNIT_CODED_SLICE_GDR && !m_pcPic->cs->pps->getMixedNaluTypesInPicFlag())
   {
     m_prevGDRInSameLayerPOC[m_pcPic->layerId] = m_pcPic->getPOC();
   }
@@ -2580,7 +2580,7 @@ void DecLib::updateAssociatedIRAP()
 {
   const NalUnitType pictureType = m_pcPic->getPictureType();
 
-  if (pictureType == NAL_UNIT_CODED_SLICE_IDR_W_RADL || pictureType == NAL_UNIT_CODED_SLICE_IDR_N_LP || pictureType == NAL_UNIT_CODED_SLICE_CRA)
+  if ((pictureType == NAL_UNIT_CODED_SLICE_IDR_W_RADL || pictureType == NAL_UNIT_CODED_SLICE_IDR_N_LP || pictureType == NAL_UNIT_CODED_SLICE_CRA) && !m_pcPic->cs->pps->getMixedNaluTypesInPicFlag())
   {
     m_associatedIRAPDecodingOrderNumber[m_pcPic->layerId] = m_pcPic->getDecodingOrderNumber();
     m_pocCRA[m_pcPic->layerId] = m_pcPic->getPOC();