[FFmpeg-devel] [PATCH] eliminate long from ByteIOContext structure
Michael Niedermayer
michaelni
Mon Mar 31 23:13:13 CEST 2008
On Mon, Mar 31, 2008 at 08:25:08PM +0200, Reimar D?ffinger wrote:
> Hello,
> On Mon, Mar 31, 2008 at 08:13:34PM +0200, Diego Biurrun wrote:
> > Here is a patch to remove long from the ByteIOContext structure with the
> > next major version bump. This was recently requested, so let's give it
> > to people. Possibly the use of uint32_t is better, I'm sure somebody
> > will point this out to me shortly if necessary.
>
> Since this is just a "wrapper" around the crc code in libavutil and that
> one uses uint32_t, yes uint32_t is better.
we also have av_adler32_update()
And iam not sure if uint32_t really is better than unsigned int. It could be
slow on some 64bit hardware ... in theory, int should always be fast.
> But there is also the problem that the function assigned to
> update_checksum still is "unsigned long" always after your patch, which
> might break rather badly in some theoretical ABI.
> I have been thinking about this myself, and the only idea I had for
> doing this without massive ifdeffery was something extremely ugly
> like and possibly broken
> > #if LIBAVFORMAT_VERSION_MAJOR >= 53
> > typedef uint32_t ff_checksum_t av_deprecated;
> > #else
> > typedef unsigned long ff_checksum_t av_deprecated;
> > #endif
>
> A define may be better, but then there is no way like av_deprecated to
> discourage use of it...
> It looks really ugly either way though...
I thought the whole change could be done easily with the next bump but
if thats not possible we could leave it as long as well.
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080331/50fa6a84/attachment.pgp>
More information about the ffmpeg-devel
mailing list