[FFmpeg-devel] [PATCH 1/2] lavc: do not init frame with guessed layout.

Michael Niedermayer michaelni at gmx.at
Mon Apr 1 21:37:12 CEST 2013

On Mon, Apr 01, 2013 at 08:39:16PM +0200, Nicolas George wrote:
> Le duodi 12 germinal, an CCXXI, Michael Niedermayer a écrit :
> > some or maybe most user applications will need code to support some
> > stereo and mono files then
> > 
> > like
> > if(channel_count == 1 && channel_layout==unknown)
> >     channel_layout = mono
> > 
> > if(channel_count == 2 && channel_layout==unknown)
> >     channel_layout = stereo
> That is true, but that is completely unrelated to this patch. What you are
> referring to happens before the codec init, for the value in AVCodecContext,
> while this patch address the problem of an AVFrame created with a
> channel_layout different from the one in the corresponding AVCodecContext.
> We can consider adding some feature to make the application programmer's
> life simpler (but not based on av_get_default_channel_layout()! based on
> AVCodec.channel_layouts), but this patch would still be needed.

you still need av_get_default_channel_layout when
AVCodec.channel_layouts isnt set. Either way iam fine with it as long
as it works


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130401/b14e5527/attachment.asc>

More information about the ffmpeg-devel mailing list