[FFmpeg-devel] [PATCH] Return ENOTSUP if codec does not support feature

Panagiotis Issaris takis.issaris
Fri Jul 20 17:14:25 CEST 2007


Hi

Op 20-jul-07, om 16:37 heeft Michael Niedermayer het volgende  
geschreven:

> Hi
>
> On Fri, Jul 20, 2007 at 03:32:36PM +0200, Panagiotis Issaris wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Hi,
>>
>> Return AVERROR(ENOTSUP) in case the used codec does not support the
>> requested feature.
>
> [...]
>> @@ -362,43 +362,43 @@
>>      if((s->flags & CODEC_FLAG_4MV) && s->codec_id != CODEC_ID_MPEG4
>>         && s->codec_id != CODEC_ID_H263 && s->codec_id !=  
>> CODEC_ID_H263P && s->codec_id != CODEC_ID_FLV1){
>>          av_log(avctx, AV_LOG_ERROR, "4MV not supported by codec\n");
>> -        return -1;
>> +        return AVERROR(ENOTSUP);
>>      }
>
> this is incorrect, the combination is invalid not just not supported
> the same is true for several others

Hmm. I interpreted this differently, namely as codec x does not  
support feature y: "Codec H263 does not support feature 4MV", "Codec  
FLV1 does not support feature 4MV", etc..

I would not return ENOTSUP in this case:
if((s->flags & CODEC_FLAG_4MV) & (s->flags & CODEC_FLAG_FEATUREFOOBAR))

As the individual features might still be supported, just not the  
combination.

But, H263, MPEG4 and so on are in fact different codecs (but  
implemented in the same file as they are very similar), right?

With friendly regards,
Takis
--
vCard: http://issaris.org/pi.vcf
PGP key: http://issaris.org/pi.key







More information about the ffmpeg-devel mailing list