[FFmpeg-devel] [PATCH] eliminate long from ByteIOContext structure

Reimar Döffinger Reimar.Doeffinger
Thu Apr 3 09:43:09 CEST 2008


On Thu, Apr 03, 2008 at 01:52:42AM +0200, Diego Biurrun wrote:
> On Thu, Apr 03, 2008 at 01:48:31AM +0200, Michael Niedermayer wrote:
> > On Thu, Apr 03, 2008 at 01:17:41AM +0200, Diego Biurrun wrote:
> > > On Thu, Apr 03, 2008 at 01:06:04AM +0200, Michael Niedermayer wrote:
> > > > On Wed, Apr 02, 2008 at 09:04:47PM +0200, Diego Biurrun wrote:
> > > > > On Wed, Apr 02, 2008 at 11:30:50AM +0200, Reimar D?ffinger wrote:
> > > > > > On Wed, Apr 02, 2008 at 09:19:45AM +0200, Diego Biurrun wrote:
> > > > > > > +unsigned long get_checksum(ByteIOContext *s);
> > > > > > > +#if LIBAVFORMAT_VERSION_MAJOR >= 53
> > > > > > > +unsigned long ff_crc04C11DB7_update(unsigned int checksum, const uint8_t *buf, unsigned int len);
> > > > > > > +void init_checksum(ByteIOContext *s, unsigned int (*update_checksum)(unsigned int c, const uint8_t *p, unsigned int len), unsigned int checksum);
> > > > > > > +#else
> > > > > > >  unsigned long ff_crc04C11DB7_update(unsigned long checksum, const uint8_t *buf, unsigned int len);
> > > > > > > -unsigned long get_checksum(ByteIOContext *s);
> > > > > > 
> > > > > > Hm, should get_checksum and ff_crc04C11DB7_update really continue to
> > > > > > return unsigned long?
> > > > > 
> > > > > .. next try ..
> > > > [...]
> > > > > +#if LIBAVFORMAT_VERSION_MAJOR >= 53
> > > > > +uint32_t ff_crc04C11DB7_update(unsigned int checksum, const uint8_t *buf, unsigned int len);
> > > >    ^^^^^^^^
> > > > 
> > > > And iam sure there are more things you should to change to int
> > > 
> > > This is on purpose, 
> > 
> > In that case i think it might be better to leave the code as it is currently
> > in svn. Because it is working currently. :)
> 
> Well, it's hard to satisfy all comments when you and Reimar tell me
> diametrically opposed things...

I was just asking, I would be for just using uint32_t everywhere but
Michael does not like that. Though I do not know what exactly this
checksum is used for, e.g. if it might make sense that someone wants to
use SHA here, in which case only an array type or a pointer would make
sense, and I also do not know if speed really matters, though I somewhat
doubt it here...

Greetings,
Reimar D?ffinger




More information about the ffmpeg-devel mailing list