Commit 2f53fce3 authored by Matthew Einhorn's avatar Matthew Einhorn Committed by Stefano Sabatini

lavc: fix wrong example code in avcodec_find_best_pix_fmt() docs

A pix_fmt_mask is obtained by bitwise or-ing two pixel format bits,
rather than doing a logical or.
Signed-off-by: 's avatarStefano Sabatini <stefano.sabatini-lala@poste.it>
parent 39f9601c
......@@ -3503,7 +3503,7 @@ int avcodec_get_pix_fmt_loss(enum PixelFormat dst_pix_fmt, enum PixelFormat src_
*
* @code
* src_pix_fmt = PIX_FMT_YUV420P;
* pix_fmt_mask = (1 << PIX_FMT_YUV422P) || (1 << PIX_FMT_RGB24);
* pix_fmt_mask = (1 << PIX_FMT_YUV422P) | (1 << PIX_FMT_RGB24);
* dst_pix_fmt = avcodec_find_best_pix_fmt(pix_fmt_mask, src_pix_fmt, alpha, &loss);
* @endcode
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment