[FFmpeg-devel] abuffersink without opaque

Clément Bœsch ubitux at gmail.com
Tue May 29 14:31:47 CEST 2012


On Tue, May 29, 2012 at 02:24:35PM +0200, Stefano Sabatini wrote:
> On date Monday 2012-05-28 23:13:01 +0200, Robert Nagy encoded:
> > Looking at abuffersink and asink_init i notice that the abuffersink
> > requires that an opaque is passed.
> > 
> >     if (!opaque) {
> >         av_log(ctx, AV_LOG_ERROR,
> >                "No opaque field provided, an AVABufferSinkParams
> > struct is required\n");
> >         return AVERROR(EINVAL);
> >     }
> > 
> 
> That was the expected behavior, you need to specify the accepted
> formats (which could be "all", in this case the user is expected to
> fill the list with "all" formats). Check for example the code in
> libavdevice.c/lavfi.c or doc/examples/filtering_audio.c.
> 
> I don't know why the error was replaced by a simple warning in
> buffersrc, that has something to do with libav merges, my wild guess
> is that it can currently work because of the bogus logic adopted by
> the "new" format API (no formats specified = all formats supported).
> 
> > I find this a bit peculiar since the "buffersink" for video just sets
> > the "common_formats" if no opaque is passed. Also looking at ffmpeg I
> > notice the following code:
> > 
> > avfilter_graph_create_filter(&ofilter->filter,
> >                                        avfilter_get_by_name("abuffersink"),
> >                                        "out", NULL, NULL, fg->graph);
> > 
> > Which as far as I understand shouldn't work, due to the asink_init code above.
> 
> Lost track of the changes in ffmpeg.c, is that code even reachable?
> 

abuffersink and abuffersink_old need some sync. ATM abuffersink is still
called with -filter_complex in case of audio (and thus fail).

I was waiting for Anton refactoring of the two functions (complex & simple
audio filtering) since the code is duplicated.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120529/501e500e/attachment.asc>


More information about the ffmpeg-devel mailing list