[Live-devel] [PATCH] Kasenna XML to SDP duration field fix

Glen Gray glen at lincor.com
Wed Nov 30 08:35:20 PST 2005


Ross Finlayson wrote:

> At 08:25 AM 11/23/2005, you wrote:
>
>> This fix is to sort a problem where the SDP was created using an 
>> unsigned int for the duration value. This would give a maximum 
>> duration of 4294 seconds, or 71 mins 30'ish seconds. Not very long 
>> and as a result vlc's length value for the
>> movie is well off. Compounded by a print formatting error to be a 
>> signed number, the SDP would only ever show a maximum length of 2147 
>> seconds, or 35'ish mins, even worse.
>>
>> This patch fixes the sscanf/printf formatting and the storatge type 
>> to be unsigned long long.
>
>
> I changed this to "unsigned long", because Visual C++ (at least, the 
> version I use) doesn't understand "unsigned long long".

The whole point of the patch is to get away from a 32bit number. The 
reason I had it as unsigned long long was because an unsigned long is 
still just a 32bit number and not large enough to hold the length of a 
full movie in microseconds. unsigned long long is a 64bit number and so 
over comes the short coming. It's a C99 data type, I don't know what 
version of Visual C++ you are using but it's listed as a supported type 
on MSDN.

Does uint64_t work instead ?

> The fix will appear in the next software release.
>
If you apply your changes, it's not fixed, so lets hold off 'til we can 
find a 64bit int that works on Visual C++ and gcc.

Kind regards,

-- 
Glen Gray <glen at lincor.com>              Digital Depot, Thomas Street
Senior Software Engineer                            Dublin 8, Ireland
Lincor Solutions Ltd.                          Ph: +353 (0) 1 4893682



More information about the live-devel mailing list