From c1dfb8571a062d7f96ebb71ec197ea524ff0bac9 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 24 Feb 2020 14:10:54 -0500 Subject: [PATCH] revert bogus code in Image(AvFrame) --- src/zm_image.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/zm_image.cpp b/src/zm_image.cpp index f83a0a555..a0dc7dbac 100644 --- a/src/zm_image.cpp +++ b/src/zm_image.cpp @@ -168,18 +168,8 @@ Image::Image( const AVFrame *frame ) { height = frame->height; pixels = width*height; - if ( frame->format == AV_PIX_FMT_RGBA ) { - colours = ZM_COLOUR_RGB32; - subpixelorder = ZM_SUBPIX_ORDER_RGBA; - } else if ( frame->format == AV_PIX_FMT_RGB24 ) { - colours = ZM_COLOUR_RGB24; - subpixelorder = ZM_SUBPIX_ORDER_RGB; - } else if ( frame->format == AV_PIX_FMT_GRAY8 ) { - colours = ZM_COLOUR_GRAY8; - subpixelorder = ZM_SUBPIX_ORDER_NONE; - } else { - Error("Unhandled frame format: %d", frame->format); - } + colours = ZM_COLOUR_RGB32; + subpixelorder = ZM_SUBPIX_ORDER_RGBA; size = pixels*colours; buffer = 0;