From 765be8c96fdf09c8eeb62ff76da1486dae53ef5d Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 8 Jul 2011 14:54:51 -0500 Subject: [PATCH] FS-3406 --resolve --- src/mod/applications/mod_conference/mod_conference.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index 067339763d..894974f001 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -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; }