[FFmpeg-devel] [PATCH] [RFC] Make avcodec_open find the default if codec is null
Michael Niedermayer
michaelni
Sun Dec 12 23:18:52 CET 2010
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
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No snowflake in an avalanche ever feels responsible. -- Voltaire
-------------- 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/20101212/9aaba659/attachment.pgp>
More information about the ffmpeg-devel
mailing list