Преглед на файлове

Support for nal start codes preceded by a zero

Eric Gressman преди 2 години
родител
ревизия
9e78edf48e
променени са 1 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. 5 1
      src/h264rtppacketizer.cpp

+ 5 - 1
src/h264rtppacketizer.cpp

@@ -63,12 +63,16 @@ NalUnitStartSequenceMatch StartSequenceMatchSucc(NalUnitStartSequenceMatch match
 	case NUSM_secondZero:
 		if (byte == 0x00 && detectLong) {
 			return NUSM_thirdZero;
+		} else if (byte == 0x00 && detectShort) {
+			return NUSM_secondZero;
 		} else if (byte == 0x01 && detectShort) {
 			return NUSM_shortMatch;
 		}
 		break;
 	case NUSM_thirdZero:
-		if (byte == 0x01 && detectLong) {
+		if (byte == 0x00 && detectLong) {
+			return NUSM_thirdZero;
+		} else if (byte == 0x01 && detectLong) {
 			return NUSM_longMatch;
 		}
 		break;