[FFmpeg-devel] Reduce the size of AVRtpPayloadTypes

Luca Abeni lucabe72
Thu Mar 27 13:44:15 CET 2008


Hi Reimar,

Reimar D?ffinger wrote:
> On Thu, Mar 27, 2008 at 11:34:59AM -0000, M?ns Rullg?rd wrote:
>> Luca Abeni wrote:
>>
>>> Since I am touching such table, I also changed "const char enc_name[50];"
>>> to "const char *enc_name;" (I believe this change is ok, and it removes
>>> the arbitrary "50" size). I'll commit this change separately.
>> This changes the type from array to pointer.  This will change the result
>> of sizeof, but should otherwise be safe.
> 
> But if reducing size is the goal

Well, while my patch reduces the object's size, this was not the primary goal.
I just did not like "enc_name[50]" and the "XXX: why 50?" comment :)


> changing it to enc_name[6] would be
> more effective, especially on 64 bit systems (probably no relevant
> difference on 32 bit systems though, except maybe better cache
> utilization which I doubt is relevant here).

Is this the preferred ffmpeg's style?
If yes, I'll change it in "enc_name[6]" (I think in this case the two
solutions are equivalent, and this is just a matter of taste).


			Thanks,
				Luca




More information about the ffmpeg-devel mailing list