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

Nicolas George nicolas.george at normalesup.org
Mon Apr 1 20:39:16 CEST 2013

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.


  Nicolas George
-------------- 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/6b8cafa2/attachment.asc>

More information about the ffmpeg-devel mailing list