[FFmpeg-devel] [PATCH] lavfi/buffersrc: set channel layout if it is known.

Nicolas George nicolas.george at normalesup.org
Sat Mar 16 00:31:47 CET 2013


Le sextidi 26 ventôse, an CCXXI, Michael Niedermayer a écrit :
> >      case AVMEDIA_TYPE_AUDIO:
> > +        if (!frame->channel_layout)
> > +            frame->channel_layout = s->channel_layout;
> this could set an inconsistent layout i think,
> consider s->channel_layout is mono and frame->channels=3

At this point, if s->channel_layout is mono, then s->channels is 1.
Therefore it should be caught by CHECK_AUDIO_PARAM_CHANGE just below that
anyway.

(Except that CHECK_AUDIO_PARAM_CHANGE currently does not check
frame->channels, only channel_layout, but that is an oversight.)

This test is needed for the following case: buffersrc is configured for an
unknown channel layout, but the negotiation on its output forced to a known
channel layout.

Regards,

-- 
  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/20130316/2eafced6/attachment.asc>


More information about the ffmpeg-devel mailing list