On Sun, Jun 26, 2011 at 03:52:00PM -0700, Ronald S. Bultje wrote:
> This prevents a crash when converting to NV12/21 without the bitexact
> flags enabled.
> ---
> libswscale/x86/swscale_template.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/libswscale/x86/swscale_template.c
> b/libswscale/x86/swscale_template.c
> index d11e3cc..642dedf 100644
> --- a/libswscale/x86/swscale_template.c
> +++ b/libswscale/x86/swscale_template.c
> @@ -2209,7 +2209,8 @@ static av_cold void RENAME(sws_init_swScale)(SwsContext
> *c)
> enum PixelFormat srcFormat = c->srcFormat,
> dstFormat = c->dstFormat;
>
> - if (!is16BPS(dstFormat) && !is9_OR_10BPS(dstFormat)) {
> + if (!is16BPS(dstFormat) && !is9_OR_10BPS(dstFormat) &&
> + dstFormat != PIX_FMT_NV12 && dstFormat != PIX_FMT_NV21) {
> if (!(c->flags & SWS_BITEXACT)) {
> if (c->flags & SWS_ACCURATE_RND) {
> c->yuv2yuv1 = RENAME(yuv2yuv1_ar );
> --
looks ok
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel