]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-3406 --resolve
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 8 Jul 2011 19:54:51 +0000 (14:54 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 8 Jul 2011 19:54:51 +0000 (14:54 -0500)
src/mod/applications/mod_conference/mod_conference.c

index 067339763d8e96815ff3a90913fa8ee8e97626f1..894974f001606048d0efea6e33657fa366ef452e 100644 (file)
@@ -1019,7 +1019,11 @@ static void *SWITCH_THREAD_FUNC conference_video_thread_run(switch_thread_t *thr
                                int y = *((int8_t *) vid_frame->data + 2) & 0xfe;
                                iframe = (y == 0x80 || y == 0x82);
                        } else if (vid_frame->codec->implementation->ianacode == 99) {  /* h.264 */
-                               iframe = (*((int16_t *) vid_frame->data) >> 5 == 0x11);
+                               u_int8_t * hdr = vid_frame->data;
+                uint8_t fragment_type = hdr[0] & 0x1f;
+                uint8_t nal_type = hdr[1] & 0x1f;
+                uint8_t start_bit = hdr[1] & 0x80;
+                iframe = (((fragment_type == 28 || fragment_type == 29) && nal_type == 5 && start_bit == 128) || fragment_type == 5);
                        } else {                        /* we need more defs */
                                iframe = 1;
                        }