[FFmpeg-devel] [PATCH] check sample_fmt in avcodec_open

Ronald S. Bultje rsbultje
Wed Feb 9 18:51:23 CET 2011


Hi,

On Wed, Feb 9, 2011 at 12:47 PM, Reimar D?ffinger
<Reimar.Doeffinger at gmx.de> wrote:
> On Wed, Feb 09, 2011 at 10:53:31AM -0500, Ronald S. Bultje wrote:
>> + ? ?if (avctx->codec->sample_fmts && avctx->codec->encode) {
>
> I remember why I didn't update the patch as requested back then:
> IMO in principle having an encode function does not necessarily
> mean it is an encoder only, it could have both an encode and decode
> functions, so I thought this horribly hackish.
> Didn't have any better idea though.

I don't think we have any such co&decs. We could assert() on it in
avcodec_register().

Ronald



More information about the ffmpeg-devel mailing list