summaryrefslogtreecommitdiffstats
path: root/libavcodec/fitsdec.c
diff options
context:
space:
mode:
authorParas Chadha <paraschadha18@gmail.com>2017-09-03 00:37:21 +0530
committerJames Almer <jamrial@gmail.com>2017-09-06 22:48:42 -0300
commitb07faf39ed10f5b24726aa25cd7134aeebb29e68 (patch)
treeb813165895346c66a2bcaa6cba59aa3a23fa62d5 /libavcodec/fitsdec.c
parentef7fe81b8554a2865d47a55edf47420878fa3d91 (diff)
downloadffmpeg-streaming-b07faf39ed10f5b24726aa25cd7134aeebb29e68.zip
ffmpeg-streaming-b07faf39ed10f5b24726aa25cd7134aeebb29e68.tar.gz
avcodec/fitsdec: write output to frame directly
Signed-off-by: Paras Chadha <paraschadha18@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/fitsdec.c')
-rw-r--r--libavcodec/fitsdec.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/fitsdec.c b/libavcodec/fitsdec.c
index 8ede0bc..b075381 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; \
} \
} \
OpenPOWER on IntegriCloud