[FFmpeg-devel] [PATCH] [RFC] Make avcodec_open find the default if codec is null
Michael Niedermayer
michaelni
Mon Dec 13 05:37:43 CET 2010
On Sun, Dec 12, 2010 at 11:43:15PM +0100, Stefano Sabatini wrote:
> On date Sunday 2010-12-12 23:18:52 +0100, Michael Niedermayer encoded:
> > On Sun, Dec 12, 2010 at 07:34:40PM +0100, Nicolas George wrote:
> > > Hi.
> > >
> > > I tried to implement Michael's recent suggestion:
> > >
> > > > make libavcodec call avcodec_find_decoder() when codec=NULL and this becomes
> > > > simpler
> > >
> > > This gave the attached patch. It has a few glitches:
> > >
> > > - avcodec_open relies on the codec parameter to know whether this is an
> > > encoder or a decoder. As decoders are probably more commonly needed than
> > > encoders, and as selecting a default encoder is less useful too, I had it
> > > default to search for a decoder.
> > >
> > > - Among the few uses of avcodec_open in the current tree, at a quick glance,
> > > only a few would benefit from the change.
> >
> > yes, maybe this suggestion was not so good after all. I had not realized there
> > would be encoder/decoder ambiguity ...
> >
> >
> > >
> > > - There is no satisfactory error code. I made another patch adding error
> > > codes for demuxer/muxer/decoder/encoder not found.
> >
> > i dont mind these error codes being added if you think they are usefull
>
> While at it also an error for missing protocols as suggested in the
> av_open_input() thread.
and filters too
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No great genius has ever existed without some touch of madness. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101213/6457ade8/attachment.pgp>
More information about the ffmpeg-devel
mailing list