[FFmpeg-devel] [RFC][PATCH] av_fifo_write_from_bytestream()

Michael Niedermayer michaelni
Thu Apr 3 14:31:12 CEST 2008


On Thu, Apr 03, 2008 at 11:41:23AM +0000, Bj?rn Axelsson wrote:
> On Thu, 2008-04-03 at 13:06 +0200, Michael Niedermayer wrote:
> > On Thu, Apr 03, 2008 at 12:14:36PM +0200, Bj?rn Axelsson wrote:
> > > Hi list,
> > > when changing the mms protocol over to use fifos I need a way to
> > > efficiently read data from a ByteIOContext into an AVFifoBuffer. 
> > > 
> > > The attached patch adds such a function to fifo.(c|h) but also makes
> > > those files depend on avformat.h
> > 
> > rejected
> > see av_fifo_generic_read()
> 
> Right you are, and blind I am...
> 
> The attached patch implements av_fifo_generic_write() modeled after
> av_fifo_generic_read().
> 
> I'll send a separate patch for reimplementing av_fifo_write() using
> av_fifo_generic_write() when (if) this is accepted.

What about replacing av_fifo_write() by av_fifo_generic_write() and
providing a wraper (maybe with attribute_deprecated)?
If you now say thats what you are doing then look at your patch, you
dont replace av_fifo_write() you add a new function.
That is you add code duplication with the intent to remove the old code
in a subsequent patch. This hides the changes between the old and new
code.


> 
> I must note that I am a bit unhappy with the error handling of this
> implementation, but it is consistent with the rest of the AVFifoBuffer
> API.

Consistency is no excuse to leave a problem unsolved.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Thouse who are best at talking, realize last or never when they are wrong.
-------------- 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/20080403/1c039750/attachment.pgp>



More information about the ffmpeg-devel mailing list