[FFmpeg-devel] [RFC] stream parsing

Benjamin Larsson banan
Sun Sep 26 12:54:34 CEST 2010


> 
> this looks strange
> i would have expected a
> if((codec->capabilities & CODEC_CAP_CHANNEL_CONF) && !channel_layout)
>     return 0;
> 
> in has_codec_parameters()


There is no AVCodec available in has_codec_parameters() only an
AVCodecContext.

> 
> but maybe this doesnt work for some case?

It wont work as it's the wrong struct.


> 
> at least your "if we dont have all parameters remove these 3 parameters"
> is looking worse
> 

This is what the AAC codec uses, I'm not saying its correct I just took
something that worked. But IIRC something need to set these to 0 before
opening the decoder otherwise it will use the values the demuxer set.

Anyway I redid the patch, it's abit more logical now but pretty much the
same.

Btw in has_codec_parameters() there is a list of codecs with some
special casing, I think these codecs should have this new capability set.

MvH
Benjamin Larsson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: codec_cap_channel_conf.diff
Type: text/x-patch
Size: 4493 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100926/66532896/attachment.bin>



More information about the ffmpeg-devel mailing list