From: Paras Chadha Date: Sat, 2 Sep 2017 19:07:21 +0000 (+0530) Subject: avcodec/fitsdec: write output to frame directly X-Git-Tag: n3.4~444 X-Git-Url: http://git.videolan.org/?p=ffmpeg.git;a=commitdiff_plain;h=b07faf39ed10f5b24726aa25cd7134aeebb29e68;hp=ef7fe81b8554a2865d47a55edf47420878fa3d91 avcodec/fitsdec: write output to frame directly Signed-off-by: Paras Chadha Signed-off-by: James Almer --- diff --git a/libavcodec/fitsdec.c b/libavcodec/fitsdec.c index 8ede0bcbfa..b0753813c9 100644 --- a/libavcodec/fitsdec.c +++ b/libavcodec/fitsdec.c @@ -264,11 +264,10 @@ static int fits_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, for (j = 0; j < avctx->width; j++) { \ t = rd; \ if (!header.blank_found || t != header.blank) { \ - t = ((t - header.data_min) * ((1 << (sizeof(type) * 8)) - 1)) / (header.data_max - header.data_min); \ + *dst++ = ((t - header.data_min) * ((1 << (sizeof(type) * 8)) - 1)) / (header.data_max - header.data_min); \ } else { \ - t = fitsctx->blank_val; \ + *dst++ = fitsctx->blank_val; \ } \ - *dst++ = (type) t; \ ptr8 += abs(cas) >> 3; \ } \ } \