[FFmpeg-devel] [PATCH 4/4] ffplay: do not set redundant channel count on abuffersink.

Nicolas George george at nsup.org
Thu Aug 20 10:52:33 EEST 2020


Marton Balint (12020-08-20):
> Why it is better if we don't set it?

It is how the API was supposed to be used from the start: these values
set the formats list for buffersink. If you said you accept anything
with two channels, then you do not need to say you accept stereo, it is
already said. It was already documented in formats.h:

 * - The list must not contain a layout with a known disposition and a
 *   channel count with unknown disposition with the same number of channels
 *   (e.g. AV_CH_LAYOUT_STEREO and FF_COUNT2LAYOUT(2).

Of course, a private header is not the proper place to document a public
API, which is what I correct in patch #2.

In practice, applications know if they want a number of channels or a
specific channel layout, and should only set one. In this case I am not
familiar enough with SDL's API to be sure, so I made the minimal change.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200820/679cacea/attachment.sig>


More information about the ffmpeg-devel mailing list