[Asterisk-video] Compiling/using app_h324m and libh32m on 64 bitplatforms

Sergio Garcia Murillo sergio.garcia at fontventa.com
Sun Dec 9 14:01:49 CST 2007


Hi Bjorn

Thanks for the fix, I've commited it to the repository. I'll check the
unsigned long issue also
during the week.

Best regards
Sergio

----- Original Message ----- 
From: "Bjorn Hijmans | Mobillion" <Bjorn.Hijmans at mobillion.nl>
To: <asterisk-video at lists.digium.com>
Sent: Friday, December 07, 2007 10:52 AM
Subject: [spam][Asterisk-video] Compiling/using app_h324m and libh32m on 64
bitplatforms


> Hi all,
>
> First of all: Sergio, thanks a lot for all your excellent work!
>
> We found several problems when using libh324m and app_h324m on 64 bits.
> Hopefully this helps others trying to compile on 64 bits platforms (and
> Sergio: maybe it fixes a bug in your code).
>
>
> * The most important problem is a possible bug in the app_h324m code:
>
> It seems, in an ast_frame, the framedata is put at the end of the struct
> after a gap of AST_FRIENDLY_OFFSET bytes. The position of the pointer is
> determined in the following line:
>
> /* Set data */
> send->data = (unsigned char*)send + AST_FRIENDLY_OFFSET;
>
> (this is line 153 of app_h324m.c)
>
> If this is used on a 64 bits platform the send->data pointer will point
> into the struct. This is because the size of the ast_frame struct itself
> is not taken into account when calculating the pointer. So, we think it
> should be:
>
> /* Set data */
> send->data = (unsigned char*)send + sizeof(struct ast_frame) +
> AST_FRIENDLY_OFFSET;
>
> We are not C guru's so we could be wrong but after this change recording
> video (mp4_save) works fine. Before the change, the ast_frame got
> corrupted after setting variables in the timeval struct:
>
> send->delivery.tv_usec = 0;
> send->delivery.tv_sec = 0;
>
>
> * In libh324m in several files the size of the pointer should change
> from unsigned int to unsigned long. The files are H245MasterSlave.cpp
> (line 29), H324MAL2.cpp (line 79), H324MSession.cpp (line 64) and
> FileLogger.cpp (line 46 and line 105).
>
>
> Let me know if you need more info!
>
> Thanks,
> Bjorn Hijmans
> Mobillion
> http://www.mobillion.nl
>
>
>
>
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-video mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-video
>





More information about the asterisk-video mailing list