payload_len -= header_len;
if (!rtph263depay->start) {
- /* do not skip this fragment if it is a Mode A with picture start code */
- if (!F && payload_len > 4 && (GST_READ_UINT32_BE (payload) >> 10 == 0x20)) {
- GST_DEBUG ("Mode A with PSC => frame start");
+ /* only mode A should be used when there is a picture start code, but
+ * buggy payloaders may send mode B/C in start of frame */
+ if (payload_len > 4 && (GST_READ_UINT32_BE (payload) >> 10 == 0x20)) {
+ GST_DEBUG ("Mode %c with PSC => frame start", "ABC"[F+P]);
rtph263depay->start = TRUE;
if ((! !(payload[4] & 0x02)) != I) {
GST_DEBUG ("Wrong Picture Coding Type Flag in rtp header");