[FFmpeg-devel] [PATCH] Add AVIO_FLAG_DIRECT.
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Sun Apr 1 20:31:29 CEST 2012
On Sun, Apr 01, 2012 at 08:22:11PM +0200, Michael Niedermayer wrote:
> On Sun, Apr 01, 2012 at 08:09:13PM +0200, Reimar Döffinger wrote:
> > On Sun, Apr 01, 2012 at 12:11:29PM +0200, Michael Niedermayer wrote:
> > > On Wed, Mar 28, 2012 at 10:26:35PM +0200, Reimar Döffinger wrote:
> > > > Allows avoiding the buffer when using avio read and write functions.
> > > > The test does not work: It works for testing reading, but for
> > > > writing avio_flags never gets set in the ffmpeg.c part of the change.
> > >
> > > what works, LGTM
> >
> > I can't parse that answer.
> > Should I commit even though setting the flag for writing and thus
> > testing doesn't work?
>
> what i meant was that the code that works (reading) LGTM
> i made no comment on the writing code, i dont know why it doesnt work/
> havt reviewed it
The writing code is working just fine, make fate passes with e.g. this
change (ok, it only got through vsynth so far):
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -80,7 +80,7 @@ int ffio_init_context(AVIOContext *s,
s->buffer_size = buffer_size;
s->buf_ptr = buffer;
s->opaque = opaque;
- s->direct = 0;
+ s->direct = !!seek;
url_resetbuf(s, write_flag ? AVIO_FLAG_WRITE : AVIO_FLAG_READ);
s->write_packet = write_packet;
s->read_packet = read_packet;
The thing that doesn't work is the option parsing again, they just don't
seem to be set on the output AVFormatContext.
More information about the ffmpeg-devel
mailing list