[FFmpeg-devel] [PATCH] don't set is_streamed when it's not

Michael Niedermayer michaelni
Thu Dec 20 21:33:15 CET 2007


On Thu, Dec 20, 2007 at 07:30:04PM +0100, Reimar D?ffinger wrote:
> Hello,
> On Thu, Dec 20, 2007 at 01:16:11PM -0500, Rich Felker wrote:
> > On Thu, Dec 20, 2007 at 10:33:38AM +0100, Michael Niedermayer wrote:
> [...]
> > > What is the advantage of having one get and one set function for each field
> > > in ByteIOContext compared to direct access to ByteIOContext?
> > > Will you also propose to add such get/set functions for each field in
> > > AVCodecContext and AVFormatContext ?
> > 
> > I agree with Michael here. Just have a policy of not reordering fields
> > and adding new ones only at the end. Then direct access is possible
> > and ABI is never broken. All this wrapper function mess reaks of C++
> > and has no practical benefit.
> 
> Well, it has the disadvantage that it can be used without calling an
> allocation function, thus making sure that adding new fields will break,
> and worse it will break in a very hard to find way.

as ive suggested on mplayer-dev

Simply putting
char end[INT_MAX/2];
at the end of the structure if its #included outside lav* makes misuse
harder.

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- 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/20071220/53a165cd/attachment.pgp>



More information about the ffmpeg-devel mailing list